Guest User

Untitled

a guest
Jan 18th, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. template<class... Types>
  2. void f(typename Types::X... args){
  3.  
  4. }
  5.  
  6. struct S{
  7. typedef int X;
  8. };
  9.  
  10.  
  11. int main()
  12. {
  13. S s1;
  14. S s2;
  15. S s3;
  16.  
  17. f(1,1,2);
  18. }
  19.  
  20. error: no matching function for call to 'f'
  21. f(s1,s2,s3);
  22. ^
  23. note: candidate function not viable: requires 0 arguments, but 3 were provided
  24. void f(typename Types::X... args){
  25. ^
Add Comment
Please, Sign In to add comment