Skip to content

Instantly share code, notes, and snippets.

@deque-blog
Created April 27, 2018 07:05
Show Gist options
  • Save deque-blog/e90c8f8211764ea0d8346c6f1b43368e to your computer and use it in GitHub Desktop.
Save deque-blog/e90c8f8211764ea0d8346c6f1b43368e to your computer and use it in GitHub Desktop.
class MyClass
{
public:
static struct ConstructThisWay{} constructThisWay;
static struct ConstructThatWay{} constructThatWay;
explicit MyClass(ConstructThisWay);
explicit MyClass(ConstructThatWay);
// ...
};
// Selecting the overload
MyClass x(MyClass::constructThatWay);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment