Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- template <class T>
- void Yeap(T);
- int main() {
- Yeap(0);
- return 0;
- }
- template <class T>
- void YeapImpl();
- struct X;
- template <class T>
- void Yeap(T) {
- YeapImpl<X>(); // pass X to another template
- }
- template <class T>
- void YeapImpl() {
- T().foo();
- }
- struct X {
- void foo() {}
- };
Add Comment
Please, Sign In to add comment