Skip to content

Instantly share code, notes, and snippets.

@bastih
Created January 26, 2013 16:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bastih/4643077 to your computer and use it in GitHub Desktop.
Save bastih/4643077 to your computer and use it in GitHub Desktop.
C++ never seizes...
struct A {
template <bool b>
void foo () {}
};
template<class T >
struct B {
void foo() {
T t;
t.foo<false>(); // fix via: t.template foo<false>();
}
};
int main() {
B<A> val;
val.foo();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment