Skip to content

Be able to assign a stout::Borrowable<> object #56

Description

@stephaniepalocz

I would like to create a stout::Borrowable as a member variable in a class (in my case, for a test fixture class, but that part isn't super important), where my T needs to be initialized in the body of the class constructor (i.e. not in the initializer list).

Unfortunately, because stout::Borrowable does not have operator=, I don't see a way for me to set the variable's value in the constructor body, even though it hasn't been initialized to anything else yet.

Other types of smart pointer allow assignment, and it's confusing to me that this type doesn't.

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