Title
Nested friend templates of class templates
Status
open
Section
17.6.4 [temp.friend]
Submitter
John Spicer

Created on 2016-07-17.00:00:00, last changed 2016-07-17.00:00:00.

Messages

Date: 2016-07-17.00:00:00

The current wording is not clear how to declare that a nested class template of a class template is a friend of its containing template. For example, is

  template <class T> struct C {
    template <bool b> class Foo;
    template <bool b> friend class Foo;
  }; 

correct, or should it be

  template <class T> struct C {
    template <bool b> class Foo;
    template <class X> template <bool b> friend class C<X>::Foo;
  }; 
History
Date User Action Args
2016-07-17 00:00:00admincreate