Title
Default argument instantiation for friends
Status
drafting
Section
13.9.2 [temp.inst]
Submitter
Hubert Tong

Created on 2016-05-04.00:00:00 last changed 73 months ago

Messages

Date: 2016-12-15.00:00:00

Notes from the December, 2016 teleconference:

This issue should be resolved by the resolution of issue 2174.

Date: 2022-02-18.07:47:23

The instantiation of default arguments for friends defined in a templated entity is not covered by 13.7.1 [temp.decls.general] paragraph 3 or 13.9.2 [temp.inst] paragraph 2. Consider:

  template <typename T>
  struct A {
    friend void foo(A &&, int = T::happy) { }
  };

  int main(void) { foo(A<int>(), 0); }

There is implementation divergence in the treatment of this example.

History
Date User Action Args
2018-04-11 00:00:00adminsetstatus: open -> drafting
2017-02-06 00:00:00adminsetmessages: + msg5840
2016-05-04 00:00:00admincreate