This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 119a. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.
2025-12-20
[Moved to DR at the November, 2014 meeting.]
In Bloomington there was general agreement that given a classthat uses non-static data member initializers, theexception-specification for the default constructor depends onwhether those initializers are noexcept. However, according to11.4 [class.mem] paragraph 2, the class is regarded ascomplete within thebrace-or-equal-initializers fornon-static data members.
This suggests that we need to finish processing the classbefore parsing the NSDMI, but our direction onissue 1351 suggests that we need to parse theNSDMI in order to finish processing the class. Can't haveboth...
Additional note (March, 2013):
A specific example:
struct A { void *p = A{}; operator void*() const { return nullptr; } };Perhaps the best way of addressing this would be to make it ill-formedfor a non-static data member initializer to use a defaulted constructorof its class.
See alsoissue 1360.
Notes from the September, 2013 meeting:
One approach that might be considered would be to parse deferredportions lazily, on demand, and then issue an error if this results ina cycle.
Proposed resolution (February, 2014):
Change 11.4 [class.mem] paragraph 4 as follows:
Abrace-or-equal-initializer shall appear only in the declaration ofa data member. (For static data members, see 11.4.9.3 [class.static.data];for non-static data members, see 11.9.3 [class.base.init]).Abrace-or-equal-initializer for a non-static data member shall notdirectly or indirectly cause the implicit definition of a defaulteddefault constructor for the enclosing class or theexception-specification of that constructor.