Advertisement
Guest User

Untitled

a guest
Jan 16th, 2019
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.23 KB | None | 0 0
  1. struct X{};
  2.  
  3. namespace N
  4. {
  5.     template <class T>
  6.     struct S
  7.     {
  8.         friend void operator+(X, S(*)()) {}
  9.     };
  10. }
  11.  
  12. template <class T>
  13.  T foo()
  14. {
  15.     return {};
  16. }
  17.  
  18.  
  19.  
  20. int main()
  21. {
  22.     X{} + foo<N::S<int>>;
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement