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-exception
6//
7//===----------------------------------------------------------------------===//
8
9// UNSUPPORTED: c++03
10
11// <memory>
12
13// This test ensures that we don't use a non-uglified name 'base' in the
14// implementation of scoped_allocator_adaptor.
15//
16// See https://github.com/llvm/llvm-project/issues/78754.
17
18#include <memory>
19#include <scoped_allocator>
20
21using ScopedAlloc = std::scoped_allocator_adaptor<std::allocator<int>, std::allocator<int>>;
22struct MyBase {
23 using base = MyBase;
24};
25struct MyDerived : ScopedAlloc, MyBase {};
26
27using T = MyDerived::base; // Should be well-formed
28

source code of libcxx/test/std/utilities/allocator.adaptor/base-is-uglified.compile.pass.cpp