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#include <any>
10
11namespace std {
12const char* bad_any_cast::what() const noexcept { return "bad any cast"; }
13} // namespace std
14
15#include <__config>
16
17#if _LIBCPP_AVAILABILITY_MINIMUM_HEADER_VERSION < 7
18
19// Preserve std::experimental::any_bad_cast for ABI compatibility
20// Even though it no longer exists in a header file
21_LIBCPP_BEGIN_NAMESPACE_LFTS
22
23class _LIBCPP_EXPORTED_FROM_ABI bad_any_cast : public bad_cast {
24public:
25 virtual const char* what() const noexcept;
26};
27
28const char* bad_any_cast::what() const noexcept { return "bad any cast"; }
29
30#endif
31
32_LIBCPP_END_NAMESPACE_LFTS
33