diff options
author | Louis Dionne <ldionne@apple.com> | 2018-12-11 14:22:28 +0000 |
---|---|---|
committer | Louis Dionne <ldionne@apple.com> | 2018-12-11 14:22:28 +0000 |
commit | 9f77b1a1de8a57e6bd21c52f9c48e0f4d8ebac25 (patch) | |
tree | 74c5a07ea01e2745dc250c07f2e455df107b0094 /libcxx/test/std/utilities | |
parent | bca37ac8b8e1031626d90c48a7522db4cca9c641 (diff) | |
download | bcm5719-llvm-9f77b1a1de8a57e6bd21c52f9c48e0f4d8ebac25.tar.gz bcm5719-llvm-9f77b1a1de8a57e6bd21c52f9c48e0f4d8ebac25.zip |
[pair] Mark constructors as conditionally noexcept
Summary:
std::tuple marks its constructors as noexcept when the corresponding
memberwise constructors are noexcept too -- this commit improves std::pair
so that it behaves the same.
This is a re-application of r348824, which broke the build in C++03 mode
because a test was marked as supported in C++03 when it shouldn't be.
Note:
I did not add support in the explicit and non-explicit `pair(_Tuple&& __p)`
constructors because those are non-standard extensions, and supporting them
properly is tedious (we have to copy the rvalue-referenceness of the deduced
_Tuple&& onto the result of tuple_element).
<rdar://problem/29537079>
Reviewers: mclow.lists, EricWF
Subscribers: christof, llvm-commits
Differential Revision: https://reviews.llvm.org/D48669
llvm-svn: 348847
Diffstat (limited to 'libcxx/test/std/utilities')
-rw-r--r-- | libcxx/test/std/utilities/utility/pairs/pairs.pair/piecewise.pass.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libcxx/test/std/utilities/utility/pairs/pairs.pair/piecewise.pass.cpp b/libcxx/test/std/utilities/utility/pairs/pairs.pair/piecewise.pass.cpp index c738adad7d7..aa86949dd5b 100644 --- a/libcxx/test/std/utilities/utility/pairs/pairs.pair/piecewise.pass.cpp +++ b/libcxx/test/std/utilities/utility/pairs/pairs.pair/piecewise.pass.cpp @@ -17,9 +17,10 @@ // pair(piecewise_construct_t, tuple<Args1...> first_args, // tuple<Args2...> second_args); -#include <utility> -#include <tuple> #include <cassert> +#include <tuple> +#include <utility> + int main() { |