Mark de Wever | df5fd83 | 2020-11-26 19:12:18 +0100 | [diff] [blame] | 1 | // -*- C++ -*- |
| 2 | //===--------------------------- format -----------------------------------===// |
| 3 | // |
| 4 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
| 5 | // See https://llvm.org/LICENSE.txt for license information. |
| 6 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
| 9 | |
| 10 | #ifndef _LIBCPP_FORMAT |
| 11 | #define _LIBCPP_FORMAT |
| 12 | |
| 13 | /* |
| 14 | |
| 15 | namespace std { |
| 16 | // [format.error], class format_error |
| 17 | class format_error : public runtime_error { |
| 18 | public: |
| 19 | explicit format_error(const string& what_arg); |
| 20 | explicit format_error(const char* what_arg); |
| 21 | }; |
| 22 | } |
| 23 | |
| 24 | */ |
| 25 | |
| 26 | #include <__config> |
| 27 | #include <stdexcept> |
| 28 | #include <version> |
| 29 | |
| 30 | #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) |
| 31 | # pragma GCC system_header |
| 32 | #endif |
| 33 | |
| 34 | _LIBCPP_PUSH_MACROS |
| 35 | #include <__undef_macros> |
| 36 | |
| 37 | _LIBCPP_BEGIN_NAMESPACE_STD |
| 38 | |
| 39 | #if _LIBCPP_STD_VER > 17 |
| 40 | |
| 41 | class _LIBCPP_EXCEPTION_ABI format_error : public runtime_error { |
| 42 | public: |
| 43 | _LIBCPP_INLINE_VISIBILITY explicit format_error(const string& __s) |
| 44 | : runtime_error(__s) {} |
| 45 | _LIBCPP_INLINE_VISIBILITY explicit format_error(const char* __s) |
| 46 | : runtime_error(__s) {} |
| 47 | virtual ~format_error() noexcept; |
| 48 | }; |
| 49 | |
Mark de Wever | df5fd83 | 2020-11-26 19:12:18 +0100 | [diff] [blame] | 50 | #endif //_LIBCPP_STD_VER > 17 |
| 51 | |
| 52 | _LIBCPP_END_NAMESPACE_STD |
| 53 | |
| 54 | _LIBCPP_POP_MACROS |
| 55 | |
| 56 | #endif // _LIBCPP_FORMAT |