C++17 Question | Proposal N3922

Hi,

my name is José Luis, I have a question regarding backwards compatibility of proposal N3922 for C++17:
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n3922.html

That change introduces a new incompatibility with C++14 and C++11, as it is stated in the C++17 Standard:
C.4.3 Clause 10: declarations [diff.cpp14.dcl.dcl]
http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#2038

Is it considered a New Feature or a Defect Report?

I am asking this because Clang (and GCC) adopted the new rule not only for C++17 but also for C++14 and C++11. In fact, I found this comment:
This is a backwards-incompatible change that is applied to all language versions that allow type deduction from auto (per the request of the C++ committee).
http://clang.llvm.org/cxx_status.html#n3922

Can someone please confirm and explain why the C++ committee requested compiler developers to treat this new rule as a Defect Report and, hence, to fix/change it also in C++11 and C++14?

Or is it just a New Feature and, therefore, C++11 and C++14 should behave in a different way to C++17 as stated in the corresponding published standard versions?

Many Thanks for your Help and Time.

Best Regards,

Hi,

my name is José Luis, I have a question regarding backwards compatibility
of proposal N3922 for C++17:
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n3922.html

There's more information available in the papers referenced by n3922: "For
background information see N3681
<http://open-std.org/JTC1/SC22/WG21/docs/papers/2013/n3681.html>, "Auto and
braced-init-lists", by Voutilainen, and N3912, "Auto and braced-init-lists,
continued", also by Voutilainen."

That change introduces a new incompatibility with C++14 and C++11, as it
is stated in the C++17 Standard:
C.4.3 Clause 10: declarations [diff.cpp14.dcl.dcl]
http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#2038

Is it considered a New Feature or a Defect Report?

Quoting from n3922: "Direction from EWG is that we consider this a defect
in C++14."

I am asking this because Clang (and GCC) adopted the new rule not only for
C++17 but also for C++14 and C++11. In fact, I found this comment:
This is a backwards-incompatible change that is applied to all language
versions that allow type deduction from auto (per the request of the C++
committee).
http://clang.llvm.org/cxx_status.html#n3922

Can someone please confirm and explain why the C++ committee requested
compiler developers to treat this new rule as a Defect Report and, hence,
to fix/change it also in C++11 and C++14?

Ville Voutilainen's n3912.html gives more information on that.

n3681.html mentions the example of init-captures. Using the original
wording of C++14, `[a{b}]` would not have deduced `a` as a copy of `b`,
although it was the intent of "uniform initialization" that it should do
so. When the rules as written fail to capture the intent in basic cases,
the committee might consider it a defect, as in this case.

-- James