Title
Name lookup of mem-initilizer-id
Status
nad
Section
6.5.2 [class.member.lookup]
Submitter
Richard Smith

Created on 2015-01-31.00:00:00 last changed 115 months ago

Messages

Date: 2015-05-15.00:00:00

Rationale (May, 2015):

The use of a qualified-id as a mem-initializer-id is sufficiently unusual that it is not worth changing the lookup rules to accommodate it.

Date: 2022-11-20.07:54:16

The name lookup in a base-specifier and a mem-initializer differ in that the former ignores non-type names but the latter does not. When the mem-initializer-id is qualified, this can lead to surprising results:

  struct file_stat : ::stat {    // the class
    file_stat() : ::stat{} {}    // the function
  };
History
Date User Action Args
2015-05-25 00:00:00adminsetmessages: + msg5961
2015-01-31 00:00:00admincreate