chromium/third_party/libc++/src/include/__chrono/parser_std_format_spec.h

// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___CHRONO_PARSER_STD_FORMAT_SPEC_H
#define _LIBCPP___CHRONO_PARSER_STD_FORMAT_SPEC_H

#include <__config>
#include <__format/concepts.h>
#include <__format/format_error.h>
#include <__format/format_parse_context.h>
#include <__format/formatter_string.h>
#include <__format/parser_std_format_spec.h>
#include <string_view>

#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#  pragma GCC system_header
#endif

_LIBCPP_BEGIN_NAMESPACE_STD

#if _LIBCPP_STD_VER >= 20

namespace __format_spec {

// By not placing this constant in the formatter class it's not duplicated for char and wchar_t
inline constexpr __fields __fields_chrono_fractional{};
inline constexpr __fields __fields_chrono{};

/// Flags available or required in a chrono type.
///
/// The caller of the chrono formatter lists the types it has available and the
/// validation tests whether the requested type spec (e.g. %M) is available in
/// the formatter.
/// When the type in the chrono-format-spec isn't present in the data a
/// \ref format_error is thrown.
enum class __flags {};

_LIBCPP_HIDE_FROM_ABI constexpr __flags operator&(__flags __lhs, __flags __rhs) {}

_LIBCPP_HIDE_FROM_ABI constexpr void __validate_second(__flags __flags) {}

_LIBCPP_HIDE_FROM_ABI constexpr void __validate_minute(__flags __flags) {}

_LIBCPP_HIDE_FROM_ABI constexpr void __validate_hour(__flags __flags) {}

_LIBCPP_HIDE_FROM_ABI constexpr void __validate_time(__flags __flags) {}

_LIBCPP_HIDE_FROM_ABI constexpr void __validate_day(__flags __flags) {}

_LIBCPP_HIDE_FROM_ABI constexpr void __validate_month(__flags __flags) {}

_LIBCPP_HIDE_FROM_ABI constexpr void __validate_year(__flags __flags) {}

_LIBCPP_HIDE_FROM_ABI constexpr void __validate_date(__flags __flags) {}

_LIBCPP_HIDE_FROM_ABI constexpr void __validate_date_or_duration(__flags __flags) {}

_LIBCPP_HIDE_FROM_ABI constexpr void __validate_date_time(__flags __flags) {}

_LIBCPP_HIDE_FROM_ABI constexpr void __validate_weekday(__flags __flags) {}

_LIBCPP_HIDE_FROM_ABI constexpr void __validate_duration(__flags __flags) {}

_LIBCPP_HIDE_FROM_ABI constexpr void __validate_time_zone(__flags __flags) {}

template <class _CharT>
class _LIBCPP_TEMPLATE_VIS __parser_chrono {};

} // namespace __format_spec

#endif // _LIBCPP_STD_VER >= 20

_LIBCPP_END_NAMESPACE_STD

#endif // _LIBCPP___CHRONO_PARSER_STD_FORMAT_SPEC_H