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// http://wg21.link/LWG2447 gives implementors freedom to reject volatile types in `std::allocator`.
10
11#include <memory>
12
13std::allocator<volatile int> A1; // expected-error@*:* {{std::allocator does not support volatile types}}
14std::allocator<const volatile int> A2; // expected-error@*:* {{std::allocator does not support volatile types}}
15

source code of libcxx/test/libcxx/memory/allocator_volatile.verify.cpp