2 //===----------------------------------------------------------------------===//
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
8 //===----------------------------------------------------------------------===//
10 #ifndef _LIBCPP___FORMAT_FORMAT_FWD_H
11 #define _LIBCPP___FORMAT_FORMAT_FWD_H
13 #include <__availability>
15 #include <__iterator/concepts.h>
16 #include <__utility/forward.h>
18 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
19 #pragma GCC system_header
23 #include <__undef_macros>
25 _LIBCPP_BEGIN_NAMESPACE_STD
27 #if _LIBCPP_STD_VER > 17
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)
35 template <class _Context>
36 class _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT basic_format_arg;
38 template <class _Context, class... _Args>
39 struct _LIBCPP_TEMPLATE_VIS __format_arg_store;
41 template <class _Ctx, class... _Args>
42 _LIBCPP_HIDE_FROM_ABI __format_arg_store<_Ctx, _Args...>
43 make_format_args(const _Args&...);
45 template <class _Tp, class _CharT = char>
46 struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT formatter;
48 #endif // !defined(_LIBCPP_HAS_NO_CONCEPTS)
50 #endif //_LIBCPP_STD_VER > 17
52 _LIBCPP_END_NAMESPACE_STD
56 #endif // _LIBCPP___FORMAT_FORMAT_FWD_H