llvm-project/libcxx
Howard Hinnant ccad8c32e0 This fixes a very subtle ABI problem concerning the copy constructor of
pair, and a couple of pair-like implementation detail types.  The
C++98/03 and 11 standards all specify that the copy constructor of
pair<int, int> is trivial. However as libc++ tracked the draft C++11
standard over the years, this copy constructor became non-trivial, and
then just recently was corrected back to trivial for C++11.

Unfortunately (for libc++1) the Itanium ABI specifies different calling
conventions for trivial and non-trivial copy constructors.  Therefore
currently the C++03 libc++ copy constructor for pair<int, int> is ABI
incompatible with the C++11 libc++ copy constructor for pair<int, int>.
This is Bad(tm).   This patch corrects the situation by making this copy
constructor trivial in C++03 mode as well.

Just in case it is needed for an incomplete C++11 compiler, libc++
retains the ability to support pair with rvalue references, but without
defaulted special members.  However the pair needs non-trivial special
members to implement this special case, (as it did when clang was in
this place a couple of years ago).

During this work a bug was also found and fixed in
is_trivially_constructible.

And there is a minor drive-by fix in <__config> regarding
__type_visibility__.

A test is updated to ensure that the copy constructor of pair<int, int>
is trivial in both C++03 and C++11.  This test will necessarily fail for
a compiler that implements rvalue references but not defaulted special
members.

llvm-svn: 194536
2013-11-13 00:39:22 +00:00
..
cmake Explicitly specify -Wno-error if LIBCXX_ENABLE_WERROR is false. 2013-10-02 07:44:19 +00:00
include This fixes a very subtle ABI problem concerning the copy constructor of 2013-11-13 00:39:22 +00:00
lib G M: Remove unneeded warnings in buildit that are hindering porting. 2013-10-05 00:13:31 +00:00
src Patch from Bruce Mitchener; fixes two typos in comments. No functionality change. PR17843 2013-11-11 23:27:19 +00:00
test This fixes a very subtle ABI problem concerning the copy constructor of 2013-11-13 00:39:22 +00:00
www Fix LWG Issue 2078. Make std::async(policy,...) try multiple policies until one succeeds. 2013-11-03 15:43:35 +00:00
.arcconfig Add a simple .arcconfig to make using the 'arc' commandline tool and the 2012-12-31 05:59:45 +00:00
CMakeLists.txt Patch by GM: Turn off 'deprecated' warnings when building with MSVC, and add '-Werror=return-type' to catch funtions that aren't returning what they should. 2013-10-21 15:56:35 +00:00
CREDITS.TXT Updated my role 2013-09-28 01:25:55 +00:00
LICENSE.TXT Update the copyright coredits -- Happy new year 2013! 2013-01-01 10:00:19 +00:00
Makefile Change makefile comment to refer to libc++ instead of libcpp. 2013-04-23 19:26:55 +00:00