Issue2261

Title 2261. Explicit instantiation of in-class friend definition
Status extension Section 17.6.4 [temp.friend]
Submitter Jens Maurer

Created on 2016-04-28.00:00:00 by admin, last changed by admin.

Messages
msg6217 (view) Date: 2018-03-15.00:00:00

Notes from the March, 2018 meeting:

CWG did not come to consensus on the desired outcome and feels that the question should be addressed by EWG.

msg5911 (view) Date: 2018-04-11.00:00:00

The status of an example like the following is unclear:

  struct S { 
   template <class T> friend void f(T) { } 
  }; 
  template void f(int);  // Well-formed?

A friend is not found by ordinary name lookup until it is explicitly declared in the containing namespace, but declaration matching does not use ordinary name lookup. There is implementation divergence on the handling of this example.

History
Date User Action Args
2018-04-11 00:00:00adminsetstatus: open -> extension
2018-04-11 00:00:00adminsetmessages: + msg6217
2018-02-27 00:00:00adminsetsection: 14.5.4 [temp.friend] -> 17.6.4 [temp.friend]
2016-04-28 00:00:00admincreate