llvm-project/libcxx
Eric Fiselier 74cba6427a Cleanup and guard tuple's constructor SFINAE. Fixes PR22806 and PR23256.
There are two main fixes in this patch.

First the constructor SFINAE was changed so that it's evaluated in two stages
where the first stage evaluates the "safe" SFINAE conditions and the second
evaluates the "dangerous" ones. The key is that the second stage is lazily
evaluated only if the first stage passes. This helps fix PR23256
(https://llvm.org/bugs/show_bug.cgi?id=23256).

The second fix is for PR22806 and LWG issue 2549. This fix applies
the suggested resolution to the LWG issue in order to prevent the construction
of dangling references. The SFINAE for this check is contained within
the _PreferTupleLikeConstructor alias template. The tuple-like constructors
are disabled whenever that trait returns false.

(https://llvm.org/bugs/show_bug.cgi?id=22806)
(http://cplusplus.github.io/LWG/lwg-active.html#2549)

llvm-svn: 266461
2016-04-15 18:05:59 +00:00
..
cmake Fix PR26622 - Make CheckLibcxxAtomic.cmake use the libc++ headers. 2016-02-20 00:24:43 +00:00
docs [docs] Remove references to autoconf build. 2016-01-30 01:11:42 +00:00
include Cleanup and guard tuple's constructor SFINAE. Fixes PR22806 and PR23256. 2016-04-15 18:05:59 +00:00
lib Re-commit "Introduce a cmake module to figure out whether we need to link with libatomic." 2016-02-11 12:43:04 +00:00
src Reorganize _LIBCPP_LOCALE__L_EXTENSIONS 2016-03-09 15:39:39 +00:00
test Cleanup and guard tuple's constructor SFINAE. Fixes PR22806 and PR23256. 2016-04-15 18:05:59 +00:00
utils Add more missing license headers 2016-01-19 21:58:49 +00:00
www Update filesystem status 2016-04-08 21:52:32 +00:00
.arcconfig Update Arcanist config to point to reviews.llvm.org 2014-06-10 18:29:36 +00:00
.gitignore [libc++] Refactor test components into modules. 2015-01-09 18:03:29 +00:00
CMakeLists.txt libc++: fix typo 2016-03-05 14:22:02 +00:00
CREDITS.TXT Add self to CREDITS.txt 2015-02-26 00:48:22 +00:00
LICENSE.TXT Update copyright year to 2016. 2016-03-30 22:39:53 +00:00
TODO.TXT Test commit to see if libcxx.llvm.org/docs builds 2015-09-04 22:57:00 +00:00