blob: 3795258bb0614449dc059f6d91af11a2215f9125 [file] [log] [blame]
Eric Fiselier78653ab2015-07-31 02:24:58 +00001//===---------------------------- any.cpp ---------------------------------===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is dual licensed under the MIT and the University of Illinois Open
6// Source Licenses. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9
Eric Fiselierf6b3bfe2016-08-11 03:13:11 +000010#include "any"
Eric Fiselier78653ab2015-07-31 02:24:58 +000011
Eric Fiselierf6b3bfe2016-08-11 03:13:11 +000012namespace std {
Eric Fiselier78653ab2015-07-31 02:24:58 +000013const char* bad_any_cast::what() const _NOEXCEPT {
14 return "bad any cast";
15}
Eric Fiselierf6b3bfe2016-08-11 03:13:11 +000016}
Marshall Clow6c374492018-02-01 18:45:57 +000017
18
19#include <experimental/__config>
20
21// Preserve std::experimental::any_bad_cast for ABI compatibility
22// Even though it no longer exists in a header file
23_LIBCPP_BEGIN_NAMESPACE_LFTS
24
25class _LIBCPP_EXCEPTION_ABI _LIBCPP_AVAILABILITY_BAD_ANY_CAST bad_any_cast : public bad_cast
26{
27public:
28 virtual const char* what() const _NOEXCEPT;
29};
30
31const char* bad_any_cast::what() const _NOEXCEPT {
32 return "bad any cast";
33}
34
35_LIBCPP_END_NAMESPACE_LFTS