Created
May 25, 2017 14:01
-
-
Save njlr/a4dd36461f9272cf12333c2524a3c4ed to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct Foo { | |
int bar() { | |
return ptr->bar(); | |
} | |
Foo(int x); | |
// Thanks to value_ptr we get value semantics for free | |
Foo(Foo const&) = default; | |
Foo& operator=(Foo const&) = default; | |
~Foo() = default; | |
struct Pimpl; | |
value_ptr<Pimpl> ptr; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment