[PATCH] [libc++] In C++11 GNU extension mode, start emulating libstdc++'s use of constexpr.
Peter Collingbourne
peter at pcc.me.uk
Tue Nov 26 14:04:35 PST 2013
Hi rsmith, howard.hinnant,
libstdc++ always declares various entities as constexpr if C++14 makes
them constexpr, even in C++11 mode. To support programs which rely on this
behavior, start applying constexpr to those entities in C++11 mode only if
GNU extensions are enabled (i.e. -std=gnu++11).
We have to be selective about which entities we do this for because of the
relaxed constexpr rules in C++14.
This patch applies the change to entities in <utility>, as well as its
dependencies, std::move and std::forward.
http://llvm-reviews.chandlerc.com/D2276
Files:
include/__config
include/__tuple
include/type_traits
include/utility
test/utilities/utility/pairs/pair.astuple/get_const.pass.cpp
test/utilities/utility/pairs/pair.astuple/get_non_const.pass.cpp
test/utilities/utility/pairs/pair.astuple/pairs.by.type1.fail.cpp
test/utilities/utility/pairs/pair.astuple/pairs.by.type2.fail.cpp
test/utilities/utility/pairs/pair.astuple/pairs.by.type3.fail.cpp
test/utilities/utility/pairs/pairs.pair/const_first_const_second.pass.cpp
test/utilities/utility/pairs/pairs.pair/const_pair_U_V.pass.cpp
test/utilities/utility/pairs/pairs.pair/copy_ctor.pass.cpp
test/utilities/utility/pairs/pairs.pair/default.pass.cpp
test/utilities/utility/pairs/pairs.spec/comparison.pass.cpp
test/utilities/utility/pairs/pairs.spec/make_pair.pass.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D2276.1.patch
Type: text/x-patch
Size: 15636 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20131126/ffe094f9/attachment.bin>
More information about the cfe-commits
mailing list