Eric Fiselier | 78653ab | 2015-07-31 02:24:58 +0000 | [diff] [blame] | 1 | //===---------------------------- 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 Fiselier | f6b3bfe | 2016-08-11 03:13:11 +0000 | [diff] [blame] | 10 | #include "any" |
Eric Fiselier | 78653ab | 2015-07-31 02:24:58 +0000 | [diff] [blame] | 11 | |
Eric Fiselier | f6b3bfe | 2016-08-11 03:13:11 +0000 | [diff] [blame] | 12 | namespace std { |
Eric Fiselier | 78653ab | 2015-07-31 02:24:58 +0000 | [diff] [blame] | 13 | const char* bad_any_cast::what() const _NOEXCEPT { |
| 14 | return "bad any cast"; |
| 15 | } |
Eric Fiselier | f6b3bfe | 2016-08-11 03:13:11 +0000 | [diff] [blame] | 16 | } |
Marshall Clow | 6c37449 | 2018-02-01 18:45:57 +0000 | [diff] [blame^] | 17 | |
| 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 | |
| 25 | class _LIBCPP_EXCEPTION_ABI _LIBCPP_AVAILABILITY_BAD_ANY_CAST bad_any_cast : public bad_cast |
| 26 | { |
| 27 | public: |
| 28 | virtual const char* what() const _NOEXCEPT; |
| 29 | }; |
| 30 | |
| 31 | const char* bad_any_cast::what() const _NOEXCEPT { |
| 32 | return "bad any cast"; |
| 33 | } |
| 34 | |
| 35 | _LIBCPP_END_NAMESPACE_LFTS |