-// Copyright (C) 2013-2014 Free Software Foundation, Inc.
+// Copyright (C) 2013-2021 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
-// { dg-options "-std=gnu++11" }
+// { dg-do run { target c++11 } }
#include <unordered_map>
#include <memory>
using __gnu_test::SimpleAllocator;
template class std::unordered_multimap<T, T, hash, equal_to,
- SimpleAllocator<T>>;
+ SimpleAllocator<std::pair<const T, T>>>;
void test01()
{
- bool test __attribute__((unused)) = true;
- typedef SimpleAllocator<T> alloc_type;
+ typedef SimpleAllocator<std::pair<const T, T>> alloc_type;
typedef std::allocator_traits<alloc_type> traits_type;
typedef std::unordered_multimap<T, T, hash, equal_to, alloc_type> test_type;
test_type v(alloc_type{});
v.emplace(std::piecewise_construct,
std::make_tuple(T()), std::make_tuple(T()));
- VERIFY( v.max_size() == traits_type::max_size(v.get_allocator()) );
+ VERIFY( v.max_size() < traits_type::max_size(v.get_allocator()) );
}
int main()