Advertisement
Guest User

Untitled

a guest
Feb 23rd, 2019
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. template <typename T>
  2. struct A
  3. {
  4. void foo(int);
  5. };
  6.  
  7. template <>
  8. void A<int>::foo(int)
  9. {
  10. }
  11.  
  12. template <typename> struct C {};
  13.  
  14. template <typename T>
  15. struct A
  16. {
  17. void foo(int);
  18. };
  19.  
  20. template <typename T>
  21. void A<C<T> >::foo(int)
  22. {
  23. }
  24.  
  25. test.cpp:10:23: error: invalid use of incomplete type 'struct A<C<T> >'
  26. test.cpp:4:8: error: declaration of 'struct A<C<T> >'
  27.  
  28. template <typename T>
  29. struct A
  30. {
  31. template <typename U>
  32. void foo(U);
  33. };
  34.  
  35. template <>
  36. template <typename U>
  37. void A<int>::foo(U)
  38. {
  39. }
  40.  
  41. template <typename> struct C {};
  42.  
  43. template <typename T>
  44. struct A
  45. {
  46. template <typename U>
  47. void foo(U);
  48. };
  49.  
  50. template <typename T>
  51. template <typename U>
  52. void A<C<T> >::foo(U)
  53. {
  54. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement