blob: 833423a5052727634f04636cb29970a59e18676c [file] [log] [blame]
Mark de Weverdf5fd832020-11-26 19:12:18 +01001// -*- 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
15namespace 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
41class _LIBCPP_EXCEPTION_ABI format_error : public runtime_error {
42public:
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 Weverdf5fd832020-11-26 19:12:18 +010050#endif //_LIBCPP_STD_VER > 17
51
52_LIBCPP_END_NAMESPACE_STD
53
54_LIBCPP_POP_MACROS
55
56#endif // _LIBCPP_FORMAT