Remove undefined behavior from tests; specifically, ensure that the value type of the allocators match the value type of the containers
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@254030 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -38,7 +38,7 @@ int main()
|
||||
assert(m.size() == 2);
|
||||
}
|
||||
{
|
||||
typedef std::pair<MoveOnly, double> V;
|
||||
typedef std::pair<const MoveOnly, double> V;
|
||||
std::map<MoveOnly, double, std::less<MoveOnly>, min_allocator<V>> m;
|
||||
assert(m.size() == 0);
|
||||
assert(m[1] == 0.0);
|
||||
|
||||
Reference in New Issue
Block a user