Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
stephaniepalocz opened this issue Jun 27, 2022 · 0 comments
Open

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

stephaniepalocz opened this issue Jun 27, 2022 · 0 comments

Comments

@stephaniepalocz
Copy link

stephaniepalocz commented Jun 27, 2022

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.

@stephaniepalocz stephaniepalocz changed the title Be able to assign a stout::Borrowed<> object Be able to assign a stout::Borrowable<> object Jun 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant