Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <cstdio>
- template<bool x>
- struct A
- {
- void meow()
- {
- printf("meow\n");
- }
- };
- template<>
- struct A <true>
- {
- void gav()
- {
- printf("gav\n");
- }
- }
- int main()
- {
- A<true> x;
- A<false> y;
- y.meow();
- x.meow();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement