Files
clang-p2996/libcxx/test/std/utilities/memory/temporary.buffer/depr.verify.cpp
Nikolas Klauser 2fcf99d703 [libc++] Implement P0174R2 (Deprecating Vestigial Library Parts in C++17)
Reviewed By: ldionne, Mordante, #libc

Spies: jwakely, libcxx-commits

Differential Revision: https://reviews.llvm.org/D127387
2022-06-21 08:22:44 +02:00

19 lines
688 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
//
//===----------------------------------------------------------------------===//
// REQUIRES: c++17
// Ensure allocator<void> is deprecated
#include <memory>
void test() {
auto a = std::get_temporary_buffer<int>(1); // expected-warning {{'get_temporary_buffer<int>' is deprecated}}
std::return_temporary_buffer(a.first); // expected-warning {{'return_temporary_buffer<int>' is deprecated}}
}