Path: blob/main/contrib/llvm-project/libcxx/include/__format/formatter.h
35260 views
// -*- C++ -*-1//===----------------------------------------------------------------------===//2//3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.4// See https://llvm.org/LICENSE.txt for license information.5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception6//7//===----------------------------------------------------------------------===//89#ifndef _LIBCPP___FORMAT_FORMATTER_H10#define _LIBCPP___FORMAT_FORMATTER_H1112#include <__config>13#include <__fwd/format.h>1415#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)16# pragma GCC system_header17#endif1819_LIBCPP_BEGIN_NAMESPACE_STD2021#if _LIBCPP_STD_VER >= 202223/// The default formatter template.24///25/// [format.formatter.spec]/526/// If F is a disabled specialization of formatter, these values are false:27/// - is_default_constructible_v<F>,28/// - is_copy_constructible_v<F>,29/// - is_move_constructible_v<F>,30/// - is_copy_assignable<F>, and31/// - is_move_assignable<F>.32template <class _Tp, class _CharT>33struct _LIBCPP_TEMPLATE_VIS formatter {34formatter() = delete;35formatter(const formatter&) = delete;36formatter& operator=(const formatter&) = delete;37};3839# if _LIBCPP_STD_VER >= 234041template <class _Tp>42_LIBCPP_HIDE_FROM_ABI constexpr void __set_debug_format(_Tp& __formatter) {43if constexpr (requires { __formatter.set_debug_format(); })44__formatter.set_debug_format();45}4647# endif // _LIBCPP_STD_VER >= 2348#endif // _LIBCPP_STD_VER >= 204950_LIBCPP_END_NAMESPACE_STD5152#endif // _LIBCPP___FORMAT_FORMATTER_H535455