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