cxx/test/utilities
Howard Hinnant 3f81e9eeba 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.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@194536 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-13 00:39:22 +00:00
..
allocator.adaptor Test adjustment for recent changes in allocator_traits 2010-12-10 19:22:37 +00:00
date.time license change 2010-11-16 22:09:02 +00:00
function.objects Implement n3789; constexpr support in named function objects 2013-09-28 19:06:12 +00:00
intseq Implement n3658 - Compile-time integer sequences 2013-07-01 16:26:55 +00:00
memory LWG Issue 2162: mark allocator_traits::maxsize as noexcept 2013-08-27 20:22:15 +00:00
meta Avoid using the name 'bzero' for an enumerator in global scope. <strings.h> might declare this as a function. 2013-10-21 04:59:37 +00:00
optional Apparently, I don't know the difference between 'left' and 'right'. Swap parameters named 'lhs' and 'rhs' so that they correctly refer to the 'left hand side' and 'right hand side' of comparisons. No functionality change. Thanks to Arthur O'Dwyer for pointing this out to me. 2013-10-07 02:37:18 +00:00
ratio Fix ratio arithmetic with zero 2011-11-01 23:13:37 +00:00
template.bitset Test case was forming the wrong limits when size_t != unsigned long. 2013-03-29 21:22:22 +00:00
time Mark namespaces for user defined literals as 'inline' 2013-10-05 21:18:32 +00:00
tuple Implement LWG issue 2275 'forward_as_tuple should be constexpr' 2013-10-05 18:46:37 +00:00
type.index Fixing up some ABI issues 2011-07-07 21:03:52 +00:00
utilities.general license change 2010-11-16 22:09:02 +00:00
utility This fixes a very subtle ABI problem concerning the copy constructor of 2013-11-13 00:39:22 +00:00
utility.requirements license change 2010-11-16 22:09:02 +00:00
nothing_to_do.pass.cpp license change 2010-11-16 22:09:02 +00:00