]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm-project/libcxx/include/__format/format_fwd.h
Merge llvm-project main llvmorg-14-init-17616-g024a1fab5c35
[FreeBSD/FreeBSD.git] / contrib / llvm-project / libcxx / include / __format / format_fwd.h
1 // -*- C++ -*-
2 //===----------------------------------------------------------------------===//
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_FORMAT_FWD_H
11 #define _LIBCPP___FORMAT_FORMAT_FWD_H
12
13 #include <__availability>
14 #include <__config>
15 #include <__iterator/concepts.h>
16 #include <__utility/forward.h>
17
18 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
19 #pragma GCC system_header
20 #endif
21
22 _LIBCPP_PUSH_MACROS
23 #include <__undef_macros>
24
25 _LIBCPP_BEGIN_NAMESPACE_STD
26
27 #if _LIBCPP_STD_VER > 17
28
29 // TODO FMT Remove this once we require compilers with proper C++20 support.
30 // If the compiler has no concepts support, the format header will be disabled.
31 // Without concepts support enable_if needs to be used and that too much effort
32 // to support compilers with partial C++20 support.
33 #if !defined(_LIBCPP_HAS_NO_CONCEPTS)
34
35 template <class _Context>
36 class _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT basic_format_arg;
37
38 template <class _Context, class... _Args>
39 struct _LIBCPP_TEMPLATE_VIS __format_arg_store;
40
41 template <class _Ctx, class... _Args>
42 _LIBCPP_HIDE_FROM_ABI __format_arg_store<_Ctx, _Args...>
43 make_format_args(const _Args&...);
44
45 template <class _Tp, class _CharT = char>
46 struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT formatter;
47
48 #endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
49
50 #endif //_LIBCPP_STD_VER > 17
51
52 _LIBCPP_END_NAMESPACE_STD
53
54 _LIBCPP_POP_MACROS
55
56 #endif // _LIBCPP___FORMAT_FORMAT_FWD_H