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// These macros do not seem to behave as expected on all Apple platforms.
10// Since the macros are not provided newer POSIX versions it is expected the
11// macros will be retroactively removed from C++. (The deprecation was
12// retroactively.)
13// UNSUPPORTED: apple-clang && (c++03 || clang-modules-build)
14
15// <system_error>
16
17// enum errc {...}
18
19// tests LWG 3869 deprecated enum members.
20
21#include <system_error>
22
23[[maybe_unused]] std::errc nodata =
24 std::errc::no_message_available; // expected-warning {{'no_message_available' is deprecated}}
25[[maybe_unused]] std::errc nosr =
26 std::errc::no_stream_resources; // expected-warning {{'no_stream_resources' is deprecated}}
27[[maybe_unused]] std::errc nostr = std::errc::not_a_stream; // expected-warning {{'not_a_stream' is deprecated}}
28[[maybe_unused]] std::errc timeout = std::errc::stream_timeout; // expected-warning {{'stream_timeout' is deprecated}}
29

source code of libcxx/test/std/depr.cerro/system.error.syn.verify.cpp