Skip to content

Instantly share code, notes, and snippets.

@je4d
Created May 7, 2015 14:05
Show Gist options
  • Save je4d/eec0d9edb86f8e2d7e38 to your computer and use it in GitHub Desktop.
Save je4d/eec0d9edb86f8e2d7e38 to your computer and use it in GitHub Desktop.
struct A
{
};
struct B
{
B(const A&){}
void foo();
};
bar(B b);
A a;
foo(a); // not OK, even though foo(b) is ok and a is implicitly convertible to b
a.bar(); // OK, even though no bar(A) exists
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment