1*0b57cec5SDimitry Andric //===---------------------------- any.cpp ---------------------------------===// 2*0b57cec5SDimitry Andric // 3*0b57cec5SDimitry Andric // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4*0b57cec5SDimitry Andric // See https://llvm.org/LICENSE.txt for license information. 5*0b57cec5SDimitry Andric // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6*0b57cec5SDimitry Andric // 7*0b57cec5SDimitry Andric //===----------------------------------------------------------------------===// 8*0b57cec5SDimitry Andric 9*0b57cec5SDimitry Andric #include "any" 10*0b57cec5SDimitry Andric 11*0b57cec5SDimitry Andric namespace std { 12*0b57cec5SDimitry Andric const char* bad_any_cast::what() const _NOEXCEPT { 13*0b57cec5SDimitry Andric return "bad any cast"; 14*0b57cec5SDimitry Andric } 15*0b57cec5SDimitry Andric } 16*0b57cec5SDimitry Andric 17*0b57cec5SDimitry Andric 18*0b57cec5SDimitry Andric #include <experimental/__config> 19*0b57cec5SDimitry Andric 20*0b57cec5SDimitry Andric // Preserve std::experimental::any_bad_cast for ABI compatibility 21*0b57cec5SDimitry Andric // Even though it no longer exists in a header file 22*0b57cec5SDimitry Andric _LIBCPP_BEGIN_NAMESPACE_LFTS 23*0b57cec5SDimitry Andric 24*0b57cec5SDimitry Andric class _LIBCPP_EXCEPTION_ABI _LIBCPP_AVAILABILITY_BAD_ANY_CAST bad_any_cast : public bad_cast 25*0b57cec5SDimitry Andric { 26*0b57cec5SDimitry Andric public: 27*0b57cec5SDimitry Andric virtual const char* what() const _NOEXCEPT; 28*0b57cec5SDimitry Andric }; 29*0b57cec5SDimitry Andric 30*0b57cec5SDimitry Andric const char* bad_any_cast::what() const _NOEXCEPT { 31*0b57cec5SDimitry Andric return "bad any cast"; 32*0b57cec5SDimitry Andric } 33*0b57cec5SDimitry Andric 34*0b57cec5SDimitry Andric _LIBCPP_END_NAMESPACE_LFTS 35