Vendor import of llvm-project branch release/19.x llvmorg-19.1.1-0-gd401987fe349...
[freebsd/src.git] / libcxx / src / any.cpp
blobb0ad695669dec40b6c3f7156c82bda0661955d84
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 //===----------------------------------------------------------------------===//
9 #include <any>
11 namespace std {
12 const char* bad_any_cast::what() const noexcept { return "bad any cast"; }
13 } // namespace std
15 #include <experimental/__config>
17 // Preserve std::experimental::any_bad_cast for ABI compatibility
18 // Even though it no longer exists in a header file
19 _LIBCPP_BEGIN_NAMESPACE_LFTS
21 class _LIBCPP_EXPORTED_FROM_ABI _LIBCPP_AVAILABILITY_BAD_ANY_CAST bad_any_cast : public bad_cast {
22 public:
23 virtual const char* what() const noexcept;
26 const char* bad_any_cast::what() const noexcept { return "bad any cast"; }
28 _LIBCPP_END_NAMESPACE_LFTS