History log of /external/libcxx/test/utilities/utility/pairs/pairs.pair/copy_ctor.pass.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
3f81e9eebaf662f230d3dff7329098df6ee7e36d 13-Nov-2013 Howard Hinnant <hhinnant@apple.com> 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
/external/libcxx/test/utilities/utility/pairs/pairs.pair/copy_ctor.pass.cpp
206f6cdc3328959aed4ece29ad65d8320da246f2 16-Jul-2013 Marshall Clow <mclow.lists@gmail.com> Bug 16599 part 2: Make std::pair's constructors and comparison operators (and make_pair) constexpr.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@186430 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/test/utilities/utility/pairs/pairs.pair/copy_ctor.pass.cpp
b64f8b07c104c6cc986570ac8ee0ed16a9f23976 16-Nov-2010 Howard Hinnant <hhinnant@apple.com> license change

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@119395 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/test/utilities/utility/pairs/pairs.pair/copy_ctor.pass.cpp
f5256e16dfc425c1d466f6308d4026d529ce9e0b 11-May-2010 Howard Hinnant <hhinnant@apple.com> Wiped out some non-ascii characters that snuck into the copyright.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@103516 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/test/utilities/utility/pairs/pairs.pair/copy_ctor.pass.cpp
bc8d3f97eb5c958007f2713238472e0c1c8fe02c 11-May-2010 Howard Hinnant <hhinnant@apple.com> libcxx initial import

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@103490 91177308-0d34-0410-b5e6-96231b3b80d8
/external/libcxx/test/utilities/utility/pairs/pairs.pair/copy_ctor.pass.cpp