Skip to content

Design Issue: is unique_resource worth it? #30

@JeffGarland

Description

@JeffGarland

After looking at some other libraries like gsl_lite and even the core guidelines, they don't have unique_resource. What is the value of this type of unique_ptr with a deleter? For the file handle case so commonly cited unique_ptr may be used in combination with the c++23 std::out_ptr - this repo for an example from the paper [P1132 out_ptr - a scalable output pointer abstraction] (https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2021/p1132r8.html#design-casting-similar).

So given the existence of P1132 is there any actual rational for this type?

More to discuss here....

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions