Advertisement
Guest User

Untitled

a guest
Jul 23rd, 2017
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. template<int i>
  2. struct place_holder{};
  3. place_holder<1> _1;
  4. place_holder<2> _2;
  5.  
  6. template<typename T>
  7. struct is_placeholder:public integral_constant<int,0>{};
  8. template<int i>
  9. struct is_placeholder<place_holder<i> >:public integral_constant<int,i>{};
  10.  
  11. error: explicit specialization of non-template struct 'is_placeholder'
  12. struct is_placeholder<place_holder<i> >:public integral_constant<int,i>{};
  13. ^ ~~~~~~~~~~~~~~~~~~
  14. 1 error generated.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement