fork(1) download
  1. template <typename T>
  2. struct Foo
  3. {
  4. struct Bar
  5. {
  6. template <typename V>
  7. friend void swap(typename Foo<V>::Bar&, typename Foo<V>::Bar&);
  8. };
  9. };
  10.  
  11. template <typename T>
  12. void swap(typename Foo<T>::Bar& b1, typename Foo<T>::Bar& b2) { }
  13.  
  14. template class Foo<int>;
  15.  
  16. int main()
  17. {
  18. Foo<int>::Bar bb1, bb2;
  19. swap<int>(bb1, bb2);
  20. }
Success #stdin #stdout 0.02s 2676KB
stdin
Standard input is empty
stdout
Standard output is empty