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_FORMATTER_H
11 #define _LIBCPP___FORMAT_FORMATTER_H
12 
13 #include <__availability>
14 #include <__concepts/same_as.h>
15 #include <__config>
16 #include <__format/format_fwd.h>
17 
18 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
19 #  pragma GCC system_header
20 #endif
21 
22 _LIBCPP_BEGIN_NAMESPACE_STD
23 
24 #if _LIBCPP_STD_VER > 17
25 
26 /// The default formatter template.
27 ///
28 /// [format.formatter.spec]/5
29 /// If F is a disabled specialization of formatter, these values are false:
30 /// - is_default_constructible_v<F>,
31 /// - is_copy_constructible_v<F>,
32 /// - is_move_constructible_v<F>,
33 /// - is_copy_assignable<F>, and
34 /// - is_move_assignable<F>.
35 template <class _Tp, class _CharT>
36 struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT formatter {
37   formatter() = delete;
38   formatter(const formatter&) = delete;
39   formatter& operator=(const formatter&) = delete;
40 };
41 
42 namespace __formatter {
43 
44 /** The character types that formatters are specialized for. */
45 template <class _CharT>
46 concept __char_type = same_as<_CharT, char> || same_as<_CharT, wchar_t>;
47 
48 } // namespace __formatter
49 
50 #endif //_LIBCPP_STD_VER > 17
51 
52 _LIBCPP_END_NAMESPACE_STD
53 
54 #endif // _LIBCPP___FORMAT_FORMATTER_H
55