Created
September 5, 2016 13:52
-
-
Save telishev/a52483833ae6850df69e1e6953f6b277 to your computer and use it in GitHub Desktop.
This file contains 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
#include <iostream> | |
template <int x> struct C {}; | |
template<> | |
struct C<0> { using type = void; }; | |
struct D : C<1>, C<0> {}; | |
template <typename A = C<0>, typename = typename A::type> | |
void f (const C<0> &y) { std::cout << 0 << "\n"; } | |
template <typename A = C<1>, typename = typename A::type, typename = void> | |
void f (const C<1> &y) { std::cout << 1 << "\n"; } | |
int main () | |
{ | |
f (D ()); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment