This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 115e. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.
2024-11-11
[Moved to DR at the April, 2013 meeting.]
According to 7.6.19 [expr.ass] paragraph 9,
The meaning of x={v}, where T is the scalar type of the expression x, is that of x=T(v) except that no narrowing conversion (9.4.5 [dcl.init.list]) is allowed. The meaning of x={} is x=T().
This definition adds a gratuitous C-style cast to the right-hand operand, inadvertently allowing such things as base-to-derived conversions and circumvention of access checking.
Proposed resolution (October, 2012):
Change 7.6.19 [expr.ass] paragraph 9 as follows:
The meaning of x={v}, where T is the scalar type of the expression x, is that ofx=T(v) except that no narrowing conversion (9.4.5 [dcl.init.list]) is allowedx=T{v}. The meaning of x={} isx=T()x=T{}.