This reverts commits 30084d74765c and 5b8c17580482. The second commit was landed without proper review: not by fault of the submitter, but because I mistakenly thought this was modifying something else entirely that is unsupported. The first commit must also be reverted because it is a breaking change without the second commit. This corresponds to PRs #183223 and #188660, see those for more details.
28 lines
698 B
C++
28 lines
698 B
C++
//===----------------------------------------------------------------------===//
|
|
//
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// ADDITIONAL_COMPILE_FLAGS: -Wno-deprecated
|
|
|
|
// hash_map::hash_map(const hash_map&)
|
|
|
|
#include <cassert>
|
|
#include <ext/hash_map>
|
|
|
|
int main(int, char**) {
|
|
__gnu_cxx::hash_map<int, int> map;
|
|
|
|
map.insert(std::make_pair(1, 1));
|
|
map.insert(std::make_pair(2, 1));
|
|
|
|
auto map2 = map;
|
|
|
|
assert(map2.size() == 2);
|
|
|
|
return 0;
|
|
}
|