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

make factory function friend and its ctor private #5

Open
PeterSommerlad opened this issue Apr 2, 2019 · 0 comments
Open

make factory function friend and its ctor private #5

PeterSommerlad opened this issue Apr 2, 2019 · 0 comments

Comments

@PeterSommerlad
Copy link
Owner

Is your feature request related to a problem? Please describe.
public interface of unique_resource should be minimal.

Describe the solution you'd like
the make_unique_resource_checked factory requires a special constructor that should be private and the factory be a friend.

Describe alternatives you've considered
gcc creates an ICE when factory is declared/defined as friend.

Additional context
not sure, how to specify templated factory function as friend correctly within the class template

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