Advertisement
JoshDreamland

JDI instantiation blindspot

Feb 9th, 2014
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.39 KB | None | 0 0
  1. template<typename x> class isint {
  2.   typedef double t;
  3. };
  4. template<> class isint<int> {
  5.   typedef int t;
  6. };
  7.  
  8. template<typename x> class X {
  9.   template<typename y> class Y {
  10.     typedef x ff;
  11.     typedef typename isint<y>::t fff;
  12.   };
  13. };
  14.  
  15. template<typename z> class Z {
  16.   typedef typename X<z>::template Y<z>::ff  one;
  17.   typedef typename X<z>::template Y<z>::fff two;
  18. };
  19.  
  20. Z<int> d;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement