From d513ad88d590a29169a4108a9279c9f8708642b2 Mon Sep 17 00:00:00 2001 From: Eric Fiselier Date: Fri, 22 Apr 2016 00:15:18 +0000 Subject: [PATCH] Complete LWG issue #2016. Allocators must be nothrow swappable llvm-svn: 267085 --- .../containers/associative/map/map.special/swap_noexcept.pass.cpp | 5 +++-- .../associative/multimap/multimap.special/swap_noexcept.pass.cpp | 6 +++--- .../associative/multiset/multiset.special/swap_noexcept.pass.cpp | 6 +++--- .../containers/associative/set/set.special/swap_noexcept.pass.cpp | 5 +++-- .../containers/sequences/deque/deque.special/swap_noexcept.pass.cpp | 5 +++-- .../sequences/forwardlist/forwardlist.spec/swap_noexcept.pass.cpp | 6 +++--- .../containers/sequences/list/list.special/swap_noexcept.pass.cpp | 5 +++-- .../std/containers/sequences/vector.bool/swap_noexcept.pass.cpp | 6 +++--- .../sequences/vector/vector.special/swap_noexcept.pass.cpp | 6 +++--- .../unord/unord.map/unord.map.swap/swap_noexcept.pass.cpp | 5 +++-- .../unord/unord.multimap/unord.multimap.swap/swap_noexcept.pass.cpp | 6 +++--- .../unord/unord.multiset/unord.multiset.swap/swap_noexcept.pass.cpp | 6 +++--- .../unord/unord.set/unord.set.swap/swap_noexcept.pass.cpp | 6 +++--- libcxx/www/cxx1z_status.html | 2 +- 14 files changed, 40 insertions(+), 35 deletions(-) diff --git a/libcxx/test/std/containers/associative/map/map.special/swap_noexcept.pass.cpp b/libcxx/test/std/containers/associative/map/map.special/swap_noexcept.pass.cpp index f25dff2..63ed926 100644 --- a/libcxx/test/std/containers/associative/map/map.special/swap_noexcept.pass.cpp +++ b/libcxx/test/std/containers/associative/map/map.special/swap_noexcept.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + // // void swap(map& c) @@ -22,6 +24,7 @@ #include #include +#include "test_macros.h" #include "MoveOnly.h" #include "test_allocator.h" @@ -93,7 +96,6 @@ struct some_alloc3 int main() { -#if __has_feature(cxx_noexcept) typedef std::pair V; { typedef std::map C; @@ -145,5 +147,4 @@ int main() } #endif -#endif } diff --git a/libcxx/test/std/containers/associative/multimap/multimap.special/swap_noexcept.pass.cpp b/libcxx/test/std/containers/associative/multimap/multimap.special/swap_noexcept.pass.cpp index e70ee1f..d1c5718 100644 --- a/libcxx/test/std/containers/associative/multimap/multimap.special/swap_noexcept.pass.cpp +++ b/libcxx/test/std/containers/associative/multimap/multimap.special/swap_noexcept.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + // // void swap(multimap& c) @@ -22,6 +24,7 @@ #include #include +#include "test_macros.h" #include "MoveOnly.h" #include "test_allocator.h" @@ -93,7 +96,6 @@ struct some_alloc3 int main() { -#if __has_feature(cxx_noexcept) typedef std::pair V; { typedef std::multimap C; @@ -144,6 +146,4 @@ int main() static_assert( noexcept(swap(c1, c2)), ""); } #endif - -#endif } diff --git a/libcxx/test/std/containers/associative/multiset/multiset.special/swap_noexcept.pass.cpp b/libcxx/test/std/containers/associative/multiset/multiset.special/swap_noexcept.pass.cpp index 8e2c67c..c742c7f 100644 --- a/libcxx/test/std/containers/associative/multiset/multiset.special/swap_noexcept.pass.cpp +++ b/libcxx/test/std/containers/associative/multiset/multiset.special/swap_noexcept.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + // // void swap(multiset& c) @@ -22,6 +24,7 @@ #include #include +#include "test_macros.h" #include "MoveOnly.h" #include "test_allocator.h" @@ -93,7 +96,6 @@ struct some_alloc3 int main() { -#if __has_feature(cxx_noexcept) { typedef std::multiset C; C c1, c2; @@ -143,6 +145,4 @@ int main() static_assert( noexcept(swap(c1, c2)), ""); } #endif - -#endif } diff --git a/libcxx/test/std/containers/associative/set/set.special/swap_noexcept.pass.cpp b/libcxx/test/std/containers/associative/set/set.special/swap_noexcept.pass.cpp index 3ec6976..76528e1 100644 --- a/libcxx/test/std/containers/associative/set/set.special/swap_noexcept.pass.cpp +++ b/libcxx/test/std/containers/associative/set/set.special/swap_noexcept.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + // // void swap(set& c) @@ -22,6 +24,7 @@ #include #include +#include "test_macros.h" #include "MoveOnly.h" #include "test_allocator.h" @@ -93,7 +96,6 @@ struct some_alloc3 int main() { -#if __has_feature(cxx_noexcept) { typedef std::set C; C c1, c2; @@ -144,5 +146,4 @@ int main() } #endif -#endif } diff --git a/libcxx/test/std/containers/sequences/deque/deque.special/swap_noexcept.pass.cpp b/libcxx/test/std/containers/sequences/deque/deque.special/swap_noexcept.pass.cpp index 83bcac8..609e66f 100644 --- a/libcxx/test/std/containers/sequences/deque/deque.special/swap_noexcept.pass.cpp +++ b/libcxx/test/std/containers/sequences/deque/deque.special/swap_noexcept.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + // // void swap(deque& c) @@ -21,6 +23,7 @@ #include #include +#include "test_macros.h" #include "MoveOnly.h" #include "test_allocator.h" @@ -51,7 +54,6 @@ struct some_alloc2 int main() { -#if __has_feature(cxx_noexcept) { typedef std::deque C; C c1, c2; @@ -86,5 +88,4 @@ int main() } #endif -#endif } diff --git a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.spec/swap_noexcept.pass.cpp b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.spec/swap_noexcept.pass.cpp index cbe8142..a49c955 100644 --- a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.spec/swap_noexcept.pass.cpp +++ b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.spec/swap_noexcept.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + // // void swap(forward_list& c) @@ -21,6 +23,7 @@ #include #include +#include "test_macros.h" #include "MoveOnly.h" #include "test_allocator.h" @@ -51,7 +54,6 @@ struct some_alloc2 int main() { -#if __has_feature(cxx_noexcept) { typedef std::forward_list C; C c1, c2; @@ -85,6 +87,4 @@ int main() static_assert( noexcept(swap(c1, c2)), ""); } #endif - -#endif } diff --git a/libcxx/test/std/containers/sequences/list/list.special/swap_noexcept.pass.cpp b/libcxx/test/std/containers/sequences/list/list.special/swap_noexcept.pass.cpp index 9c83ad5..7d7ca12 100644 --- a/libcxx/test/std/containers/sequences/list/list.special/swap_noexcept.pass.cpp +++ b/libcxx/test/std/containers/sequences/list/list.special/swap_noexcept.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + // // void swap(list& c) @@ -21,6 +23,7 @@ #include #include +#include "test_macros.h" #include "MoveOnly.h" #include "test_allocator.h" @@ -51,7 +54,6 @@ struct some_alloc2 int main() { -#if __has_feature(cxx_noexcept) { typedef std::list C; C c1, c2; @@ -86,5 +88,4 @@ int main() } #endif -#endif } diff --git a/libcxx/test/std/containers/sequences/vector.bool/swap_noexcept.pass.cpp b/libcxx/test/std/containers/sequences/vector.bool/swap_noexcept.pass.cpp index 6f36473..e1dfe4f 100644 --- a/libcxx/test/std/containers/sequences/vector.bool/swap_noexcept.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector.bool/swap_noexcept.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + // // void swap(vector& c) @@ -22,6 +24,7 @@ #include #include +#include "test_macros.h" #include "test_allocator.h" template @@ -51,7 +54,6 @@ struct some_alloc2 int main() { -#if __has_feature(cxx_noexcept) { typedef std::vector C; C c1, c2; @@ -85,6 +87,4 @@ int main() static_assert( noexcept(swap(c1, c2)), ""); } #endif - -#endif } diff --git a/libcxx/test/std/containers/sequences/vector/vector.special/swap_noexcept.pass.cpp b/libcxx/test/std/containers/sequences/vector/vector.special/swap_noexcept.pass.cpp index 1d00ff3..258f22e 100644 --- a/libcxx/test/std/containers/sequences/vector/vector.special/swap_noexcept.pass.cpp +++ b/libcxx/test/std/containers/sequences/vector/vector.special/swap_noexcept.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + // // void swap(vector& c) @@ -22,6 +24,7 @@ #include #include +#include "test_macros.h" #include "MoveOnly.h" #include "test_allocator.h" @@ -52,7 +55,6 @@ struct some_alloc2 int main() { -#if __has_feature(cxx_noexcept) { typedef std::vector C; C c1, c2; @@ -86,6 +88,4 @@ int main() static_assert( noexcept(swap(c1, c2)), ""); } #endif - -#endif } diff --git a/libcxx/test/std/containers/unord/unord.map/unord.map.swap/swap_noexcept.pass.cpp b/libcxx/test/std/containers/unord/unord.map/unord.map.swap/swap_noexcept.pass.cpp index 1056c23..eb41005 100644 --- a/libcxx/test/std/containers/unord/unord.map/unord.map.swap/swap_noexcept.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.map/unord.map.swap/swap_noexcept.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + // // void swap(unordered_map& c) @@ -26,6 +28,7 @@ #include #include +#include "test_macros.h" #include "MoveOnly.h" #include "test_allocator.h" @@ -116,7 +119,6 @@ struct some_alloc3 int main() { -#if __has_feature(cxx_noexcept) typedef std::pair MapType; { typedef std::unordered_map C; @@ -195,5 +197,4 @@ int main() static_assert( noexcept(swap(c1, c2)), ""); } #endif -#endif } diff --git a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.swap/swap_noexcept.pass.cpp b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.swap/swap_noexcept.pass.cpp index 7c912e0..d7d06ad 100644 --- a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.swap/swap_noexcept.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.swap/swap_noexcept.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + // // void swap(unordered_multimap& c) @@ -26,6 +28,7 @@ #include #include +#include "test_macros.h" #include "MoveOnly.h" #include "test_allocator.h" @@ -115,7 +118,6 @@ struct some_alloc3 int main() { -#if __has_feature(cxx_noexcept) typedef std::pair V; { typedef std::unordered_multimap C; @@ -193,6 +195,4 @@ int main() static_assert( noexcept(swap(c1, c2)), ""); } #endif - -#endif } diff --git a/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.swap/swap_noexcept.pass.cpp b/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.swap/swap_noexcept.pass.cpp index 63642fc..b7d61fd 100644 --- a/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.swap/swap_noexcept.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.swap/swap_noexcept.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + // // void swap(unordered_multiset& c) @@ -26,6 +28,7 @@ #include #include +#include "test_macros.h" #include "MoveOnly.h" #include "test_allocator.h" @@ -115,7 +118,6 @@ struct some_alloc3 int main() { -#if __has_feature(cxx_noexcept) { typedef std::unordered_multiset C; C c1, c2; @@ -193,6 +195,4 @@ int main() static_assert( noexcept(swap(c1, c2)), ""); } #endif - -#endif } diff --git a/libcxx/test/std/containers/unord/unord.set/unord.set.swap/swap_noexcept.pass.cpp b/libcxx/test/std/containers/unord/unord.set/unord.set.swap/swap_noexcept.pass.cpp index 5d74640..a9c0331 100644 --- a/libcxx/test/std/containers/unord/unord.set/unord.set.swap/swap_noexcept.pass.cpp +++ b/libcxx/test/std/containers/unord/unord.set/unord.set.swap/swap_noexcept.pass.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +// UNSUPPORTED: c++98, c++03 + // // void swap(unordered_set& c) @@ -26,6 +28,7 @@ #include #include +#include "test_macros.h" #include "MoveOnly.h" #include "test_allocator.h" @@ -115,7 +118,6 @@ struct some_alloc3 int main() { -#if __has_feature(cxx_noexcept) { typedef std::unordered_set C; C c1, c2; @@ -193,6 +195,4 @@ int main() static_assert( noexcept(swap(c1, c2)), ""); } #endif - -#endif } diff --git a/libcxx/www/cxx1z_status.html b/libcxx/www/cxx1z_status.html index d0edaad..81d13e4 100644 --- a/libcxx/www/cxx1z_status.html +++ b/libcxx/www/cxx1z_status.html @@ -100,7 +100,7 @@ - + -- 2.7.4
Issue #Issue NameMeetingStatus
2016Allocators must be no-throw swappableUrbana
2016Allocators must be no-throw swappableUrbanaComplete
2118unique_ptr for array does not support cv qualification conversion of actual argumentUrbanaComplete
2170Aggregates cannot be DefaultConstructibleUrbanaComplete
2308Clarify container destructor requirements w.r.t. std::arrayUrbanaComplete