blob: 0cf09068837dbe59d6e2dbbe5a4d3af23a66af9d [file] [log] [blame]
Eric Fiselier78653ab2015-07-31 02:24:58 +00001//===---------------------------- any.cpp ---------------------------------===//
2//
Chandler Carruthd2012102019-01-19 10:56:40 +00003// 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
Eric Fiselier78653ab2015-07-31 02:24:58 +00006//
7//===----------------------------------------------------------------------===//
8
Eric Fiselierf6b3bfe2016-08-11 03:13:11 +00009#include "any"
Eric Fiselier78653ab2015-07-31 02:24:58 +000010
Eric Fiselierf6b3bfe2016-08-11 03:13:11 +000011namespace std {
Eric Fiselier78653ab2015-07-31 02:24:58 +000012const char* bad_any_cast::what() const _NOEXCEPT {
13 return "bad any cast";
14}
Eric Fiselierf6b3bfe2016-08-11 03:13:11 +000015}
Marshall Clow6c374492018-02-01 18:45:57 +000016
17
18#include <experimental/__config>
19
20// Preserve std::experimental::any_bad_cast for ABI compatibility
21// Even though it no longer exists in a header file
22_LIBCPP_BEGIN_NAMESPACE_LFTS
23
24class _LIBCPP_EXCEPTION_ABI _LIBCPP_AVAILABILITY_BAD_ANY_CAST bad_any_cast : public bad_cast
25{
26public:
27 virtual const char* what() const _NOEXCEPT;
28};
29
30const char* bad_any_cast::what() const _NOEXCEPT {
31 return "bad any cast";
32}
33
34_LIBCPP_END_NAMESPACE_LFTS