diff options
| author | Marshall Clow <mclow.lists@gmail.com> | 2014-03-05 19:06:20 +0000 |
|---|---|---|
| committer | Marshall Clow <mclow.lists@gmail.com> | 2014-03-05 19:06:20 +0000 |
| commit | 78a87e8a683d155b5287c8b1a50eef1ab51d0438 (patch) | |
| tree | 1795b686f73222c123bd09f7c9de513abcd8c8da /libcxx/test/containers/sequences/vector | |
| parent | f27217ffaff36ec12419e86713ee534c374bf2c5 (diff) | |
| download | bcm5719-llvm-78a87e8a683d155b5287c8b1a50eef1ab51d0438.tar.gz bcm5719-llvm-78a87e8a683d155b5287c8b1a50eef1ab51d0438.zip | |
Implement LWG 2193. Default constructors for standard library containers are explicit. Note that libc++ already did this for string/deque/forward_list/list/vector and the unordered containers; implement it for set/multiset/map/multimap. Add tests for all the containers. Two drive-by fixes as well: add a missing explicit in <deque>, and remove a tab that snuck into a container test. This issue is also LLVM bug 15724, and resolves it.
llvm-svn: 202994
Diffstat (limited to 'libcxx/test/containers/sequences/vector')
| -rw-r--r-- | libcxx/test/containers/sequences/vector/vector.cons/construct_default.pass.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libcxx/test/containers/sequences/vector/vector.cons/construct_default.pass.cpp b/libcxx/test/containers/sequences/vector/vector.cons/construct_default.pass.cpp index f8b66f4b6da..48c8cf810b5 100644 --- a/libcxx/test/containers/sequences/vector/vector.cons/construct_default.pass.cpp +++ b/libcxx/test/containers/sequences/vector/vector.cons/construct_default.pass.cpp @@ -27,6 +27,12 @@ test0() assert(c.__invariants()); assert(c.empty()); assert(c.get_allocator() == typename C::allocator_type()); +#if __cplusplus >= 201103L + C c1 = {}; + assert(c1.__invariants()); + assert(c1.empty()); + assert(c1.get_allocator() == typename C::allocator_type()); +#endif } template <class C> |

