[cfe-dev] C++17 Question | Proposal N3922

José Luis March Cabrelles via cfe-dev cfe-dev at lists.llvm.org
Tue Jan 9 02:52:47 PST 2018


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,

José Luis March Cabrelles, PhD
Software Quality Engineer
joseluis at solidsands.nl
Solid Sands B.V.
Mobile: +31 683 97 23 63
Office:  +31 202 44 01 99
www.solidsands.nl
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20180109/7b90bab8/attachment.html>


More information about the cfe-dev mailing list