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.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@202994 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -26,6 +26,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>
|
||||
|
||||
Reference in New Issue
Block a user