37 lines · cpp
1//===----------------------------------------------------------------------===//2//3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.4// See https://llvm.org/LICENSE.txt for license information.5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception6//7//===----------------------------------------------------------------------===//8 9// UNSUPPORTED: clang-modules-build10 11// Poison the std:: names we might use inside __gnu_cxx to ensure they're12// properly qualified.13struct allocator;14struct pair;15struct equal_to;16struct unique_ptr;17 18// Prevent <ext/hash_set> from generating deprecated warnings for this test.19// ADDITIONAL_COMPILE_FLAGS: -Wno-deprecated20 21#include <ext/hash_set>22 23#include "test_macros.h"24 25namespace __gnu_cxx {26template class hash_set<int>;27}28 29int main(int, char**) {30 typedef __gnu_cxx::hash_set<int> Set;31 Set s;32 Set s2(s);33 ((void)s2);34 35 return 0;36}37