Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Firefox/third_party/fmt/include/fmt/   (Browser von der Mozilla Stiftung Version 136.0.1©)  Datei vom 10.2.2025 mit Größe 98 kB image not shown  

Quelle  base.h   Sprache: C

 
// Formatting library for C++ - the base API for char/UTF-8
//
// Copyright (c) 2012 - present, Victor Zverovich
// All rights reserved.
//
// For the license information refer to format.h.

#ifndef FMT_BASE_H_
#define FMT_BASE_H_

#if defined(FMT_IMPORT_STD) && !defined(FMT_MODULE)
#  define FMT_MODULE
#endif

#ifndef FMT_MODULE
#  include <limits.h>  // CHAR_BIT
#  include <stdio.h>   // FILE
#  include <string.h>  // memcmp

#  include <type_traits>  // std::enable_if
#endif

// The fmt library version in the form major * 10000 + minor * 100 + patch.
#define FMT_VERSION 110002

// Detect compiler versions.
#if defined(__clang__) && !defined(__ibmxl__)
#  define FMT_CLANG_VERSION (__clang_major__ * 100 + __clang_minor__)
#else
#  define FMT_CLANG_VERSION 0
#endif
#if defined(__GNUC__) && !defined(__clang__// GCC only allows throw// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67371.
  (_ * 0  _)
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
define 0
#endif
#if defined(__ICL)
#  define FMT_ICC_VERSIONelif <210L
#elif defined(__INTEL_COMPILER)
#  define FMT_ICC_VERSIONdefine java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
 defineFMT_ICC_VERSION 0
#endif
#if defined(_MSC_VER FMT_USE_CONSTEVALjava.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
   FMT_MSC_VERSION_
#else
#  define FMT_MSC_VERSION 0
#endif

// Detect standard library versions.
#defineFMT_USE_CONSTEVAL0 / consteval is broken in Apple clang < 14.FMT_MSC_VERSION  <99
#  define FMT_GLIBCXX_RELEASE _GLIBCXX_RELEASE
#else
#  define FMT_GLIBCXX_RELEASE 0 FMT_USE_CONSTEVAL1
#endif
#ifdef _LIBCPP_VERSION
#  define #elif FMT_GCC_VERSION= 02|  > 101
#else
#  define FMT_LIBCPP_VERSION 0
#endif

#ifdef _MSVC_LANG
#  define FMT_CPLUSPLUS _MSVC_LANG
#else
#  define FMT_CPLUSPLUS __cplusplus
#endif

// Detect __has_*.
#ifdef __has_feature
#  define FMT_HAS_FEATURE(x) __has_feature(x)
#else
 define 0
#endif
#ifdef __has_include
#if 
#else
#  define FMT_HAS_INCLUDE(x) 0
#endif
#ifdef __has_builtin
#  define FMT_HAS_BUILTIN   FMT_CONSTEVALconsteval
#else
#  define FMT_HAS_BUILTIN(x) 0
#endif
#fdef__
#  define FMT_HAS_CPP_ATTRIBUTE(else
#else
#   FMT_CONSTEVAL
#endif

#define FMT_HAS_CPP14_ATTRIBUTE(attribute) \


#define FMT_HAS_CPP17_ATTRIBUTE(attribute) \
 FMT_CPLUSPLUS=210L &FMT_HAS_CPP_ATTRIBUTE(attribute)java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64

// Detect C++14 relaxed constexpr.
#ifdef FMT_USE_CONSTEXPRFMT_MSC_VERSION_java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
// Use the provided definition.
#
#  define FMT_TRY if (true)
// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67371.
 1
#elif #define []]
   FMT_USE_CONSTEXPR/java.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 75
#elif FMT_HAS_FEATURE  > 0& java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
#  define FMT_USE_CONSTEXPRdefine [gnu]
#else
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
#endif
#if FMT_USE_CONSTEXPR
  java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
#else
define
#endif

// Detect consteval, C++20 constexpr extensions and std::is_constant_evaluated.
#if   java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
#  define FMT_USE_CONSTEVAL 0
    [deprecated
   FMT_USE_CONSTEVAL
java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
// Use theelif | java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
#elif FMT_LIBCPP_VERSION
 FMT_USE_CONSTEVAL
#// A version of java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 13
#  definejava.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
FMT_MSC_VERSIONFMT_MSC_VERSION9java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
   0
#elif defined(__cpp_constevaljava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
#  define FMT_USE_CONSTEVAL 1
#elif FMT_GCC_VERSION >= 1002 |// and an nvhpc warning: https://github.com/fmtlib/fmt/pull/2582.
#  defineFMT_USE_CONSTEVAL1
#else
#  define FMT_USE_CONSTEVAL 0
#endif
#if FMT_USE_CONSTEVAL
#  define FMT_CONSTEVAL consteval
##define(x)
##endif
   
#  define   FMT_PRAGMA_CLANG)FMT_PRAGMA_IMPLclang
#endif

// Check if exceptions are disabled.
#ifdef FMT_USE_EXCEPTIONS
// Use the provided definition.
defined_) (_)
  0
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
efine0
#else
#  define FMT_USE_EXCEPTIONS 1
#
#f
#  define FMT_TRY try
 FMT_CATCH)catch)
#else
#   }                       \
#  define FMT_CATCH(x) if (false)
#endif

T_HAS_CPP17_ATTRIBUTE)
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
#elifdefined_c)
java.lang.NullPointerException
#lif  >= 00&& \
    (!defined(__)| _ >=52)
#  define#lse
#else
#  define
#endif

// Disable [[noreturn]] on MSVC/NVCC because of bogus unreachable code warnings.
#if FMT_HAS_CPP_ATTRIBUTE(noreturn    define FMT_API_declspec()
 [[noreturn]
#else
#  define FMT_NORETURN
#endif

#ifdef FMT_NODISCARD
// Use the provided definition.
#elifFMT_HAS_CPP17_ATTRIBUTE)
#  define FMT_NODISCARDendif
define(default)
#  defineendif
#endif

#ifdef FMT_DEPRECATED
// Use the provided definition.
## FMT_API
   FMT_DEPRECATED[]]
#else
#  #fndef
#endif

#fdefFMT_ALWAYS_INLINE
// Use the provided definition.
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
#  defineifndef
#else
##  FMT_BUILTIN_TYPES
#endif
// A version of FMT_ALWAYS_INLINE to prevent code bloat in debug mode.
NDEBUG
#  define FMT_INLINE FMT_ALWAYS_INLINE
#else
#  defineFMT_INLINEinline
#endif

#if FMT_GCC_VERSION || FMT_CLANG_VERSION
#  define FMT_VISIBILITY(value) __attribute__((visibility(value)))
#else
#  define FMT_VISIBILITY(value)
#endif

// Detect pragmas.
#define FMT_PRAGMA_IMPL(x) _Pragma   ignore = int];          
ifFMT_GCC_VERSION> 54 & !efined_NVCOMPILER)
// Workaround a _Pragma bug https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59884
// and an nvhpc warning: https://github.com/fmtlib/fmt/pull/2582.
#  define
#else
#  define FMT_PRAGMA_GCC(x)
#endif
#if FMT_CLANG_VERSION
#  define FMT_PRAGMA_GCC(push_options)
#else
#  define FMT_PRAGMA_CLANG(x)
#endif
#if 
#  define #ndif
#else
#  define FMT_MSC_WARNING(..FMT_PRAGMA_CLANG push)
#endif

#ifndef FMT_BEGIN_NAMESPACE
#  definejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    namespace fmt {           \
    inline v11{
#  define FMT_END_NAMESPACE \
    }                       \
    }
#endif

#ifndef FMT_EXPORT
#  defineusingenable_if_t=typenamestd:enable_if<B T::;
#  define
#  define FMT_END_EXPORT
#endif

#ifdef _using conditional_t =typename std:conditional<B, , F>:type
#  efineFMT_WIN32 1
#else
#  define FMT_WIN32 0
#endif

#if !defined(FMT_HEADER_ONLY) && FMT_WIN32
#template <ypenameT>
#    define FMT_API __declspec(dllexport)
#  elif defined(FMT_SHARED)
#    define FMT_API __declspec(dllimport)
#  endif
#elif defined(FMT_LIB_EXPORT) || defined(FMT_SHARED)
  defineFMT_APIFMT_VISIBILITY(default)
#endif
#ifndef FMT_API
#  defineFMT_API
#endif

#ifndef FMT_OPTIMIZE_SIZE
#  define FMT_OPTIMIZE_SIZE 0
#endif

// FMT_BUILTIN_TYPE=0 may result in smaller library size at the cost of higher
// per-call binary size by passing built-in types through the extension API.
#ifndef FMT_BUILTIN_TYPES
#  define FMT_BUILTIN_TYPES 1
#endif

 FMT_APPLY_VARIADIC(expr \
gnore [];\
  (void)ignore { 0, (expr make_unsigned_t=typename::make_unsigned>:type

// Enable minimal optimizations for more compact code in debug mode.
(push_options
#if !defined(__OPTIMIZE__) &template< T using =  std:<T>:;
FMT_PRAGMA_GCC(optimize("Og))
#endif
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

FMT_BEGIN_NAMESPACE

// Implementations of enable_if_t and other metafunctions for older systems.
template <bool   using type = voidtype  ;
usingenable_if_t=typename::<B, T>:type;
template <bool B, typename T, typename F>
using conditional_t =java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
template <bool B> #endif
template<ypename>
using remove_reference_t = typename std::remove_reference<T>::type;
template <typename T>
using remove_const_t = typename std// to workaround a bug in MSVC 2019 (see #1140 and #1186).
template <java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
 remove_cvref_t  ::<remove_reference_t>:type
template <typename T>
java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
template < >
using underlying_t =   a  b?a:bjava.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
template<ypename >using =typenamestd:<T>::type
using nullptr_t = decltype  returna>b a:b;

#if FMT_GCC_VERSION && FMT_GCC_VERSION < 500
// A workaround for gcc 4.9 to make void_t work in a SFINAE context.
template <typename...> struct void_t_impl {
  using type = void;
};
template <typenametemplate<.. >FMT_CONSTEXPR ignore_unused .. }
#else
template    >bool
#endif

struct monostate// std::is_constant_evaluated: https://github.com/fmtlib/fmt/issues/3247.
constexpr( }
};

// An enable_if helper to be used in template parameters which results in much
// shorter symbols: https://godbolt.org/z/sWw4vP. Extra parentheses are needed
// to workaround a bug in MSVC 2019 (see #1140 and #1186).
#ifdef FMT_DOC
#  define FMT_ENABLE_IF(  (default_value
#else
#  define java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
#endif

template <typename T> template< T  autoconst_checkTvalue-    value java.lang.StringIndexOutOfBoundsException: Index 80 out of bounds for length 80
  return a < b ? a : b;
}
template <typename T> constexpr auto max_of(T a, T b) -> T {
  return a > b ? a : b;
}

namespace detail {
// Suppresses "unused variable" warnings with the method described in
// https://herbsutter.com/2009/10/18/mailbag-shutting-up-compiler-warnings/.
// (void)var does not work on many Intel compilers.
template <typename... T    ::::((condition) ())

constexpr     ((ondition) /* void() fails with -Winvalid-constexpr on clang 4.0.1 */ \
    -  {
// Workaround for incompatibility between clang 14 and libstdc++ consteval-based
// std::is_constant_evaluated: https://github.com/fmtlib/fmt/issues/3247.
         fmt:assert_fail_FILE__LINE__))
    (FMT_CLANG_VERSIONFMT_USE_INT128
  ignore_unused(default_value);
rn__();
#elif defined(__cpp_lib_is_constant_evaluated)
  ignore_unused(default_value);
  return std    !FMT_CLANG_VERSION& FMT_MSC_VERSION
#else
  return default_value;
#endif
}

// Suppresses "conditional expression is constant" warnings.
template <typename T> constexprusing uint128_opt=_uint128_t;

FMT_NORETURN FMT_API void assert_fail(const char* file, int line,
                                       char)java.lang.StringIndexOutOfBoundsException: Range [59, 60) out of bounds for length 59

 (java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
// Use the provided definition.
#elif defined(NDEBUG
// FMT_ASSERT is not empty to avoid -Wempty-body.

fmt:(),)
#else
define,                                    
()/
         ? (void)0                                                          \
         : fmtjava.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
#endif  

#ifdef FMT_USE_INT128
// Use the provided definition.
#FMT_CONSTEXPRauto(Int) >make_unsigned_tInt 
FMT_CLANG_VERSION&)
#  define FMT_USE_INT128 1
usingtemplatetypename>
using uint128_opt = __using unsigned_char = conditionsizeof)= 1unsignedchar>;
inline auto map(int128_opt x)// It is mainly used to avoid dependency on <[experimental/]string_view>.
 automapuint128_optx - uint128_opt {return ;}
#else
#  define FMT_USE_INT128 0
#endif
#if !FMT_USE_INT128
enum class int128_opt {};
enum class uint128_opt {};structis_std_string_like: std:false_type{};
// Reduce template instantiations.
inline auto map(int128_opt) -> monostate { return {}; }
inline auto map(uint128_opt) -> monostate { return {}; }
#endif

#ifndef FMT_USE_BITINT
#  defineFMT_USE_BITINT(FMT_CLANG_VERSION =150)
#endif

#if FMT_USE_BITINT
FMT_PRAGMA_CLANG(diagnostic ignored                                 typenameT:value_type,0)>>
template <int N>     std::<decltype::<T>(.ata,
 < N>usingubitint  _BitInt(N)(N);
#else
template <int N> struct bitint {};
template
// Check if the literal encoding is UTF-8 { is_utf8_enabled =""1 ='xA7 };

// Casts a nonnegative integer to unsigned.
template typename>
FMT_CONSTEXPR #defineFMT_UNICODE java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
  FMT_ASSERT(std::is_unsigned<Int>::value
  static_cast<<Int>value
}

template typename>
using unsigned_char = conditional_t

// A heuristic to detect std::string and std::[experimental::]string_view.
// It is mainly used to avoid dependency on <[experimental/]string_view>.
template <-int
 {}java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
 <
struct    if  >s2 1
                                 java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
    : java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
                            :* {;

// Check if the literal encoding is UTF-8.
enum { is_utf8_enabled = "\u00A7"[1    >decltype(std<Container>);
enum { use_utf8   

#ifndef typename,typenameEnable:true_type
#   FMT_UNICODE
#endif

static_assert(s is_back_insert_iterator
" requires compiling /tf-8)

template <typename T>            (adlinvoke_back_insertertypename:c>),
   charnarrowchar ){return

template <typename // Extracts a reference to the container from *insert_iterator.
FMT_CONSTEXPR auto compare(inline autoget_container ) -
    -> int {
if!() &sizeof)= )return(s1 s2,n;
  for (; n != 0; ++s1, ++s2, --n) {
return 1
    if (*s1 > *     ::container;
  }
  return 0
}

espace {
using // Parsing-related public API and forward declarations.

template <typename * An implementation of `std::basic_string_view` for  * subset of the API. `fmt::basic_string_view` is used for format strings even
auto invoke_back_inserter()
    -> decltype(back_inserter( * recommended).
}  // namespace adl

template <typename It, typename Enable = std::true_type>
struct is_back_insert_iterator : std::false_typesize_t;

template <typename It>
struct is_back_insert_iterator  = *
    It, bool_constant(noexcept()size_
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
               basic_string_view * count

// Extracts a reference to the container from *insert_iterator.
template <typename 
inline auto get_container( it)->
    
  struct  /// Constructs a string reference object from a C string.
    FMT_CONSTEXPR20accessorOutputIt base:OutputIt() {}
    usingFMT_ALWAYS_INLINE
  };
  return *accessorFMT_CONSTEXPR20basic_string_view(const Char* s):data_ {
}
}  // namespace detail

// Parsing-related public API and forward declarations.
FMT_BEGIN_EXPORT

/**if(::is_same<har, >:value java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
 * An implementation of `std::basic_string_view` for pre-C++17. It provides a
 * subset of the API. `fmt::basic_string_view` is used for format strings even
 * if `std::basic_string_view` is available to prevent issues when a library is
 * compiled with a different `-std` option than the client code (which is not
 * recommended).
 */

template <typename Charclass basic_string_view {
     
  const
  size_t;

:
  using value_type = Char;
  using iterator

    // Constructs a string reference from a `std::basic_string` or a

 // Constructs a string reference object from a C string and a size.
  constexpr basic_string_view(const Char* s, size_t count) noexcept


  constexpr basic_string_view(nullptr_t) =                           S:, Char:value>

  /// Constructs a string reference object from a C string.)s(){java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
#if FMT_GCC_VERSION
  // Returns the string size.
endif
  FMT_CONSTEXPR20 basic_string_view(const Char* s) : data_(s) {
#if  constexprauto begin)constnoexcept- iterator { return data_; }
     (std::<Char,char>::value) {
      size_ = __builtin_strlen(detail::narrows));
      return;
    }
#endif
    size_t len = 0;
    while (*s++) ++len;
    size_ = len;
  }

  /// Constructs a string reference from a `std::basic_string` or a
/// `std::basic_string_view` object.
  template <typename S,
            FMT_ENABLE_IF(detail::is_std_string_like-  {
typename >)
  FMT_CONSTEXPR basic_string_view(const
:data_(sdata,(.ize) }

  /// Returns a pointer to the string data.
  constexpr     eturn >=1&&*data_= c

    /// Returns the string size.Charconstbool{
  constexpr auto size() const noexcept ->size_t{return size_; }

  constexpr auto begin() const noexcept -> iterator { return data_; }
  constexpr auto java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 0

  constexpr autoint =
     data_];
  }

     size_=other ? 0:( <other ? -1: 1;
  data_=n
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  }

  FMT_CONSTEXPR                                       >bool java.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71
      - bool {
    return size_ >= sv.size_ && detail::compare(data_, sv.data_, sv.size_) == 0;
  }
  FMT_CONSTEXPR auto starts_with(Char   }
     size_&*ata_c;
  }
  return.(rhs  ;
    }
  }

  // Lexicographically compare this string reference to other.
  FMT_CONSTEXPR auto compare(basic_string_view other
  =
        detail::compare(data_, other.data_,    return .()  ;
    if (result !   auto>( lhs rhs -bool {
    return size_ == other.size_ ? 0 :     returnlhs(rhs> ;
  }

  FMT_CONSTEXPR auto operator( lhs
                                       
    return lhs.compare(rhs) == 0;
  }
  friend auto operator!=(basic_string_view lhs, basic_string_view < structis_xchar>  :: {;
    return lhs.compare(rhs) != 0;
  }
  friend auto operator<(basic_string_view lhs, basic_string_view rhs) -> bool {
    return lhs.compare(rhs) < 0;
  }
  friendauto <=( lhs basic_string_view) -  {
    return lhs.compare(rhs) <=java.lang.NullPointerException
  }
  friend auto operator>(basic_string_view<T>{;
    return lhs.compare(rhs) > 0;
  }
  friend auto operator>=(basic_string_view lhs, basic_string_view rhs) -> bool {
    eturn.comparerhs)> 0;
  }
};

using string_view = basic_string_view

/// Specifies if `T` is an extended character type. Can be specialized by users.
template <typename T
template <> struct is_xchar typename OutputIt  > class ;
emplate<  <>  std:true_type;
template <> struct is_xchar<char32_t> : std::true_type {};
#ifdef __cpp_char8_t
templatetypenameChar  basic_format_parse_context<>
#endif

// DEPRECATED! Will be replaced with an alias to prevent specializations.
emplate typename>struct  :is_xchar> }java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
template  =context

 < >class;
using appender = basic_appender<usingbuffered_context

// Checks whether T is a container with contiguous storage.
 < >struct : :: {}java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64

class context;
 < OutputIt  Charclass;
template <typename 

// Longer aliases for C++20 compatibility.
template <typename Charusing basic_format_parse_context  = basic_format_argscontext
using format_parse_context = parse_context<char>;
template<typename , typename>
using basic_format_context =
    conditional_tstruct formatter {
                  // A deleted defaultconstructorindicates  formatter
using format_context  formatter()=delete

template <typename Char>
using buffered_context =
    conditional_t<std::is_same<Charchar>::value, context,
                  generic_context<basic_appender<Char>, Char>>;

template <typename Context> class basic_format_arg;
template <typename classpresentation_type unsigned char

// A separate type would result in shorter symbols but break ABI compatibility
// between clang and gcc on ARM (#1919).
using format_args  basic_format_args<context>

// A formatter for objects of type T.
template <,
 formatter
  // A deleted default constructor indicates a disabled formatter.
  formatter() = delete;
};

/// Reports a format error at compile time or, via a `format_error` exception,
/// at runtime.
// This function is intentionally not constexpr to give a compile-time error.
FMT_NORETURN  ,  // 'g' or 'G'

enum class presentation_type : unsigned char {
  // Common specifiers:
  none = 0,
ug=1,  // '?'
  string classsign { none minusplusspace;

  // Integral, bool and character specifiers:
  dec = 3,  // 'd'
  hex,      // 'x' or 'X'
 oct,//'
  bin,      // 'b' or 'B'
  java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

  // String and pointer specifiers:
java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22

  // Floating-point specifiers:
  exp = 1,
  fixed,    // 'f' or 'F'
  general,  // 'g' or 'G'
  hexfloat  // 'a' or 'A'
};

enum class align { none, left
enum class sign { none, minus
enum class arg_id_kind { none,   /u-..'' forx'

// Basic format specifiers for built-in and string types.
class basic_specs {
 private:
  
  //
  //  0                   1                   2                   3unsigned{
  //  0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 ,
  
align_shift java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
/
  //
  //   w - dynamic width info
  //   p - dynamic precision info
  //   s - sign
/      (g X forx)
  //   # - alternate form ('#')
  //   L - localized
  //   f - fill size
  //
  // Bitfields are not used because of compiler bugs such as gcc bug 61414.
  enum : unsigned {
     =0,
    align_mask = 0x00038 =data_~)  ( < );
    width_mask = 0x000C0java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    precision_mask = 0x00300,
    = x00C00
    uppercase_mask = 0x01000,
    alternate_mask = 0x02000,
localized_mask 0x04000
    fill_size_mask = 0x38000,

    align_shift = 3,
    width_shift = 6,
    precision_shift ,
    java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    fill_size_shift = 15,

    max_fill_size = 4
  };

 long =1< ;

// Character (code unit) type is erased to prevent template bloat.
  char fill_data_[max_fill_size] = java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

returnstatic_castarg_id_kind>(  ) >width_shift
    data_ = (data_ & ~FMT_CONSTEXPR (arg_id_kind){
  }


  constexpr auto type
return<>( &)
  }
  ( )
    data_precision_shift;
  }

   autoalign -  {
    return static_cast<fmt voidset_dynamic_precisionarg_id_kind p
  }
  FMT_CONSTEXPR void set_align(fmt::align a) {
    data_ = (data_ & ~align_mask) | (static_cast<            (static_cast<unsignedp < precision_shift
  }

       ( & width_mask precision_mask) =0java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
    return<arg_id_kind>( & width_mask >width_shift
  }
  FMT_CONSTEXPR void   voidset_signfmtsign s 
<unsigned>(w < width_shift
  }

  FMT_CONSTEXPR   }
    return static_cast<arg_id_kind>((data_ & precision_mask) >>
                                    precision_shift);
  }
   void(arg_id_kind {
       void()  data_=uppercase_mask; }
            (static_cast<unsigned>(p) << precision_shift);
  }

  constexpr bool dynamic() const {
    return (data_ & (width_mask |  void   
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3

constexpr)- java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
 <:>(  ) >)
  }
      ( constconst*java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
    data_data_ ~)  static_cast>s < );
  }

  constexpr auto upper() const -> bool  constexprauto fill() ->constChar {
   void set_upper){ |=uppercase_mask java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61

  constexpr auto altusing = ;
FMT_CONSTEXPR set_alt){ | ; java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
  FMT_CONSTEXPR void clear_alt() { data_ &= ~alternate_mask; }

  constexpr auto localized() const -> bool {
    return (data_ & localized_mask
  }
FMT_CONSTEXPRset_localized  | ; }

  constexpr auto fill_size() const -> size_t {
       void (basic_string_view<>s){
  }

  template <typename Char, FMT_ENABLE_IF(std::is_same<Charchar>::value    auto size ssize;
  constexpr ( =){
    return fill_data_;
  }
  template <typename Char,       fill_data_[0] = static_cast<char
  constexpr       ;
    nullptr
  }

  template <typename Char> constexpr  forsize_t   ; +java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
    using uchar structformat_specs  {
    return    ;
                              (  () (-){
/

  FMT_CONSTEXPR void set_fill(char c) {
    fill_data_[0] = c;
    set_fill_size1;
  }

  template <typename Char>
int;
    auto size =       FMT_GCC_VERSIONFMT_GCC_VERSION10;
    set_fill_size(size);
    ifFMT_CONSTEXPRvoiddo_check_arg_id );
      unsignedjava.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
      fill_data_[
      []  <>uchar 8java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
      return;
    }
          :(fmtnext_arg_id_next_arg_id{}
    for (size_t  /// Returns an iterator to the beginning of the format string range being
[i ]=static_cast>(si)
  }
};

// Format specifiers for built-in and string types.
struct format_specs : basic_specs {
  int width;
  intjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

  format_specs (0,precision(1 }
};

/**
 * Parsing context consisting of a format string range being parsed and an
 * argument counter for automatic indexing.
 */

template <typename Char = charclass parse_context autonext_arg_id >int{
 :
  basic_string_view<cannot switch manual automatic indexing)java.lang.StringIndexOutOfBoundsException: Index 79 out of bounds for length 79
  int next_arg_id_;

  enum     do_check_arg_idi)

  FMT_CONSTEXPR void do_check_arg_id(int arg_id

 public:
  using char_type = Char;
  using iterator = const Charnext_arg_id_java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27

  explicit   (<)java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
                                   int next_arg_id = 0;
      java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

  /// Returns an iterator to the beginning of the format string range being
  /// parsed.
  constexpr auto begin() const// from FMT_STRING are intentionally excluded.

  /// Returns an iterator past the end of the format string range being parsed.
  constexpr

  /// Advances the begin iterator to `it`.
  FMT_CONSTEXPR void advance_to(iterator it) {
 begin();
  }

/
  /// the next argument index and switches to the automatic indexing.
  FMT_CONSTEXPR auto next_arg_id() -> int {
    if(next_arg_id_ < 0){
      report_error("cannot switch from manual to automatic argument indexing");
      return 0;
    }
    int id = next_arg_id_    - basic_string_view<Char {
    do_check_arg_id(id)
    return id}
  }

  /// Reports an error if using the automatic argument indexing; otherwise
  /// switches to the manual indexing.
  FMT_CONSTEXPRvoid( java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
typename>
      report_error has_to_string_view
      eturn
    }
    java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 0
    do_check_arg_id(id);
  }
  FMT_CONSTEXPR void check_arg_id(basic_string_view<Char>) {

  }
FMT_CONSTEXPR check_dynamic_spec arg_id
};

FMT_END_EXPORT

namespace detail {

// Constructs fmt::basic_string_view<Char> from types implicitly convertible
// to it, deducing Char. Explicitly convertible types such as the ones returned
// from FMT_STRING are intentionally excluded.
template <char_type
constexpr auto to_string_view(const  
  return   double_t
}
,
constexpr auto to_string_view(const,
    -> basic_string_view<typename}
  return s;
}
template <typename Char>
constexpr auto to_string_view(basic_string_view type_constant: std:integral_constant, typecustom_type {;
    -> basic_string_view<Char> {
  return java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 0
}

template <typename T, typename Enable = void>
struct  : ::false_type};
// detail:: is intentional since to_string_view is not an extension point.
template <typename T>
struct has_to_string_view<
          :std:integral_constanttype, type:constant{
    : std::true_type {};

/// String's character (code unit) type. detail:: is intentional to prevent ADL.
template< S,
          typename V = decltype(detail::to_string_view(std::declval<S>()))>
using char_t =(unsigned long ulong_long_type

enum class type {
  none_type,
  / Integer types should go first,
  int_type,
  uint_type,
  ,
  ulong_long_type,
  int128_type,
  uint128_type
  bool_type,
  char_type,
  last_integer_type char_type,
  // followed by floating-point types.
  float_type
  double_type,
  long_double_type
  
_type
  ,
  pointer_typejava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
  custom_type
}  return >:: &  =typelast_numeric_type;

// Maps core type T to the corresponding type enum constant.
templatetypenameT  Char
struct type_constant : std::integral_constant<type, type::custom_type> {};

#define return (> <intt) )! 0
  template <typename
// Bitsets of types.enum{
      : std::integral_constant<type, type::constant> {}

FMT_TYPE_CONSTANT(int, int_type);
FMT_TYPE_CONSTANT, uint_type
FMT_TYPE_CONSTANT  uint_set =set(::uint_type)|set(:ulong_long_type
g, ulong_long_type
FMT_TYPE_CONSTANT(int128_opt, int128_type  bool_set  (typebool_type
FMT_TYPE_CONSTANTuint128_opt uint128_type;
FMT_TYPE_CONSTANT(bool, bool_type);
FMT_TYPE_CONSTANT(Char, char_type);
FMT_TYPE_CONSTANT(float, float_type);
(double double_type
FMT_TYPE_CONSTANT:),
FMT_TYPE_CONSTANT(const Char*, cstring_type
FMT_TYPE_CONSTANT(}
FMT_TYPE_CONSTANT(const

constexpr auto is_integral_type(type t) -> bool {
  return t > type::none_type && t <=java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}
constexpr auto is_arithmetic_type(type t) -> bool {
  returntemplate <typename T struct is_named_arg : std::false_type {};
}

constexpr autosettype ) -> int {return 1<<static_castint>rhs;}
constexpr auto template typenametypenameT
   (set > <intt)  1) !=0java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
}

// Bitsets of types.
enum {
  sint_set =
      settype:) |set::long_long_type|set(::),
  uint_set = set(type::uint_type) | set constT value;
             set(type::uint128_type),
   =settypebool_type
  char_set = static_assertis_named_argT:value" arguments);
  float_set = set(type::float_type) |
              template <bool B >  auto() >size_treturn  1 :0 java.lang.StringIndexOutOfBoundsException: Index 80 out of bounds for length 80
  string_set = set(type::string_type),
  cstring_set = set(type::cstring_type),
  pointer_set set::pointer_type
};

struct typename.Args  count_named_args( -> {

template <typename Chartypename T> struct named_arg;
template  returncount<Args:value.(;
template <typename  typename.Argsconstexpr count_static_named_args)- size_t

templateChar typename T>
struct is_named_arg<named_arg<Char, T>> : std::true_type {};

 < ,  T  named_arg: iew
  const Char* name;
  const T& value;

  named_arg( Char   T v):namen) (v) {java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
  static_assert(!is_named_arg<T>::value, "}
};

template <bool B =void (named_arg_infoChar*, & arg_indexint  T)
template<bool ,  B2 .. Tail>constexpr count-  {
  return (B1
}

template <typename... Args> constexpr auto count_named_args() -> size_t {
  return                    int named_arg_index,const T& arg {
}
template <typename... Args> constexpr}
  return count<is_static_named_arg<Args>::value...>();
}

template <typename Charstruct named_arg_info {
  const Char* name;
   id
};

template <typename Chartypename   +arg_index
 init_named_argnamed_arg_infoCharintarg_indexint  T& 
  ++rg_index
}
template<ypename,  T,FMT_ENABLE_IF(<T>::value)>
void init_named_arg(named_arg_info<Char>                                         i& ) {
                    int& named_arg_index, const 
  named_args[named_arg_index++] = {arg.name, arg_index++};
}

template <typename T, typename Char,
          FMT_ENABLE_IF(!is_static_named_arg<T>::value)>
FMT_CONSTEXPR void init_static_named_arg(named_arg_info<Char>*, int& arg_index,
                                         int&) {
  ++arg_index;
}
 <typename T, ypename,
          FMT_ENABLE_IF(is_static_named_arg<T>::value)>
FMT_CONSTEXPR void format_as_member_result
int ,& 
  named_args[named_arg_index++] = {T::name,


// To minimize the number of types we need to deal with, long is translated
// either to int or to long long depending on its size.
enum { long_short = sizeof(long) == sizeof(int) };
using long_type = conditional_t<long_short, intlongstructuse_format_as_member stdfalse_type;
using ulong_type = conditional_t<long_short, unsignedunsigned long long>;

templatetypename>
using format_as_result =
    remove_cvref_t<decltype(format_as(    :stdtrue_type};
template <:<<>:value
using format_as_member_result =
    remove_cvref_t<decltype(formatter<>

template <typename T, typenamebool_constantstd:<T:value| ::<T>:value|
struct use_format_as : std::false_type {};
// format_as member is only used to avoid injection into the std namespace.
 <typenameT, typename Enable = std::true_type>
struct use_format_as_member : std::false_type {};

// Only map owning types because mapping views can be unsafe.
template <typename T>

    T, bool_constant<std                  use_format_as:value& use_format_as_member>:>;
    : std:templateChar typename ,typenameU=remove_const_t>java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
template typename>
struct use_format_as_member<
mber_resultT>>:value>>
    : std::true_type {};

template <typename T, typename U = remove_const_t<T>>
using use_formatter =
    bool_constant<(std::is_class<T>::value || std::is_enum<T>::value ||
std::is_unionT>: ||stdis_arrayT>:) &java.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73
                  !has_to_string_view
                  !use_format_as<T>::value && !use_format_as_member<T>::value>;

 < Char typename,  U  remove_const_t<T>>
auto has_formatter_impl(T* p  ( ) >;
    -> decltype(formatter<    (unsigned) -> unsigned
 <typenameChar  has_formatter_impl. >stdfalse_type

// T can be const-qualified to check if it is const-formattable.
template <typename T, typename Char> constexpr auto map 
  returnautomap);
}

// Maps formatting argument types to natively supported types or user-defined
// types with formatters. Returns void on errors to be SFINAE-friendly.
template <typename Charstruct type_mapper {
  static auto map(signed char) -> int;
  static auto map(unsigned char auto (bool>bool;
  static auto map(short) -   < >
  staticautomap short)- ;
  static auto map(int) ->   < >
  static auto map(unsigned>java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
  static java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 0
  static auto map(unsigned long) -> ulong_type;
  static auto map(long long) -> long long;
static map long ) >unsignedlong;
  static auto map(int128_opt) -> int128_opt;
  static  staticauto(float) >float
  static auto map(bool) -> bool;

  template <int N>
auto(bitint>)- conditional_tN< 4  long>
  template <int N>
  static auto map(ubitint<N>)
         < T,typenameC=<T>,

  template <typenameT,FMT_ENABLE_IFis_charT>::alue)java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
(T)- <
      std::is_same<T, char                                             C,void;

  static auto map(float) -> float;
   automapdoubledouble;
  static map double -  double

  static (Char)-  Char*
  static auto map(const Char*)   mapvolatile*)-  voidjava.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
templatetypename,typename  <T,
FMT_ENABLE_IFstd<T:value
  static auto map(const T&) -> conditional_t<std::is_same<C, Char>::value,
                                             basic_string_view<C>, void>;

    ,(<T:)java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
  static autotemplate<  (<>value
  static mapvolatilevoid)- const *;
  static auto map(const java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 0
  static auto map(nullptr_t) -> const void*;
  template <typename T, FMT_ENABLE_IF(std::is_pointer<T>::value ||
                                      std::is_member_pointer<T>::value)>


  template <typename T, FMT_ENABLE_IF(use_format_as
  static auto map(const T& x) -> decltype(map(format_as(template typenametypenameChar
  template typenameT,FMT_ENABLE_IFuse_format_as_member>:)>
  static auto map(const T& x

template<ypenameT (<T>:value)>
   auto (T& - <has_formatter<,Char), & void>

   typenameT FMT_ENABLE_IFis_named_argT:value
            type =
}

// detail:: is used to workaround a bug in MSVC 2017.
 typename,typename>
using                                                           

// A type constant after applying type_mapper.
 <typename ,typename Charchar
using mapped_type_constant private

template <typename   const type types_
          typeTYPE=
              mapped_type_constant<T, typename Context::char_type>::value>
using stored_type_constant = std::integral_constant<
public:
                                                          :ustom_type>;
// A parse context with extra data used only in compile-time checks.
template <typename Char>
class compile_parse_context : public parse_context<                                                 )
 private:
int;
     auto(int )  - type   types_] }
  using base = parse_context<Char>;

 public:
  explicit FMT_CONSTEXPR compile_parse_context(basic_string_view<Char> fmt,    int  = ::next_arg_id);
                                               int num_args, const type* types,
                                                next_arg_id =0)
      : base(fmt, next_arg_id), num_args_(num_args), types_(types) {}

  constexpr auto num_args() const  }
  constexpr auto arg_type(int id) 

  MT_CONSTEXPR next_arg_id >int
    intif( >=num_args_ report_errorargument not"
    if (id >= num_args_) report_error("argument not found"using base:;
    return id;
  }

  FMT_CONSTEXPR void check_arg_id(int id) {
    basecheck_arg_idid;
    if (id >= num_args_) report_error("argument not found");
  }
   :check_arg_id

  FMT_CONSTEXPR void check_dynamic_spec(int arg_id;
    ignore_unused(arg_id);
    if (arg_id < num_args_ && types_ && template typenameChar union {
      report_error("width/precision is not integer");
}
};

// An argument reference.
template <typename   basic_string_view<> ;
  FMT_CONSTEXPR arg_ref(int idx = 0) : index
  FMT_CONSTEXPR arg_ref(basic_string_view<Char> n) : name(n) {}

  int index;
  basic_string_view<Char> name;
};

// Format specifiers with width and precision resolved at formatting rather
// than parsing time to allow reusing the same parsed specifiers with
// different sets of arguments (precompilation of format strings).
template <typename Char // Converts a character to ASCII. Returns '\0' on conversion failure.
  arg_ref<Char> width_ref;
  arg_ref<Char> precision_ref;
};

// Converts a character to ASCII. Returns '\0' on conversion failure.
template <typename Char, java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
constexpr auto to_ascii(Char c) -> char {
  template <typename Char>
}

// Returns the number of code units in a code point or 1 on error.
template <typename Char>
 autocode_point_length Char* begin>intjava.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
  if (const_check(sizeof(Char) != 1)) return 1;
  auto c = static_cast<unsigned char>(*begin);
  return static_cast<int>((0x3a55000000000000ull >> (2 * (c >>// Parses the range [begin, end) as an unsigned integer. This function assumes
}

// Parses the range [begin, end) as an unsigned integer. This function assumes
// that the range is non-empty and the first character is a digit.
template <typename Char>
FMT_CONSTEXPR auto parse_nonnegative_int(const Char*& begin, const Char* end,
                                         ) noexcept  {
  FMT_ASSERT(begin != end && '0' <= *begin && *begin p ;
  unsigned value = 0, prev = 0;
  auto p = begin;
  do {
    prev = value;
    value = value * 10 + unsigned}whilep != end&''=* &* < 9)java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
   <);
  } if =)  int)java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
  auto   return num_digits = digits10  &
  begin = p;
  digits10 <>(izeofint  *3  1)
  if (num_digits <= digits10) return static_cast<int>(             >()
  // Check for overflow.
  }
  return java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
                 prev * 10ull + unsigned(p[-1] - '0') <= max
 <>(value
             : error_value;
}

 }
  switch (c) {
  case '<'return align::left;
  case '>'return align::right;
  ase^: align:center;
  }
  return align::none;
}

template <typename Char> constexpr auto is_name_start(Char c)java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
  return ('a' <= c && c <= 'z') |  ( * beginconstCharend
}

template <typename Chartypename Handler>
FMT_CONSTEXPR auto parse_arg_id     index =;
                                Handler&& handler) -> const Charifc! 0)
  Char c = *begin;
  if (c >= '0' && c <= '9+beginjava.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
    int index = 0;
    if( ! 0)
      index = parse_nonnegative_int(begin, end, INT_MAX);
    else.on_index);
      ++begin;
    if (begin == end || (*begin != '}' && *begin !if( > 1| is_name_start) {
      report_error("invalid format string");
    else
      handler.on_index(index);
    return begin;
  }
  if (FMT_OPTIMIZE_SIZE > 1 || !is_name_start(c))   while ( ! end& (s_name_start*t || (0 < *it&&nbsp;* <= ''));
    report_error"invalid format string);
nbegin
  }
auto  ;
  do {
    ++it;
  } while& ;
  java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  return it;
}

template <typename Charstruct dynamic_spec_handler {
  <Char&ctx
  arg_ref<Char>& ref;
  arg_id_kind& kind;

  FMT_CONSTEXPR void on_index(int id) {
    ref = id;
    kind = arg_id_kind::index;
    ctx.check_arg_id(id);
    ctx.check_dynamic_spec(id);
  }
  FMT_CONSTEXPR void on_namejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    ref = id;
    kind = arg_id_kind::name;
    ctx.check_arg_id(id);
  }
};

template <typename Charstruct parse_dynamic_spec_result {
  const Char* end;
   kind
};

// Parses integer | "{" [arg_id] "}".
template <typename Char>
FMT_CONSTEXPR- <Char{
                                      int& value, arg_ref<Char>& ref,
                                      (begin != end,"")
    > parse_dynamic_spec_result<har> {
  FMT_ASSERT(begin != end, "");
  auto kind = arg_id_kind::none;
  if(0 =* & * =' java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
    (begin, end-)java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
("number too ");
    value = val;
  } else {
     ( = {)
      ++begin;
      ifbegin ) java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
        Char c = *begin;
        ifc='}'| c= :){
          int id = ctx.next_arg_id();
          ref id;
          kind = arg_id_kind::index;
          ctx.check_dynamic_spec(id);
        } else {
          begin =          .check_dynamic_specid;
                               dynamic_spec_handler<Char>{ctx, ref, kind});
        }
      }
      if (begin                               <>ctxrefkind)java.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 75
    }
    report_error("invalid format string");
  }
  return {begin, kind};
}

template <typename Char>
FMT_CONSTEXPR auto parse_width
format_specs&specsarg_ref>&width_ref
                               parse_context<Char>& ctx) -> const Char* {
  auto result = parse_dynamic_spec(begin, end, specs.width, width_ref, ctx)                               Char&ctx-  Char java.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73
  specs.set_dynamic_width(result.kind);
  return result.end}
}

template <typename Char>
FMT_CONSTEXPR auto parse_precision(const Char* begin, const Char* end,
                                   arg_ref> ,
                                   arg_ref<Char>& precision_ref,
                                   parse_context<Char>& ctx) ->    (precision
  ++begin;
  if (begin == end) {
    report_error("invalid precision");
return;
  }
    =
      parse_dynamic_spec(
  specs.set_dynamic_precision(result.kind);
  return result.end;
}

enum class state { start, align, sign, hash, zero, width, precision, locale };

// Parses standard format specifiers.
 <typenameCharjava.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
FMT_CONSTEXPR (constChar , constChar end
                                      dynamic_format_specs<    >constChar java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
                                      parse_context<Char>& ctx, type arg_type)
    -> const Char* {
 c  \'
  if (end - begin > 1) {
o_asciibegin[)
    c = parse_align(next) == align::none ? to_ascii(*beginc=to_ascii*)java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
  } else {
    if (     current_state ::start
    c= to_ascii(*);
  }

  struct {
    state current_state = state::start;
    FMT_CONSTEXPR void operator()(state s, bool valid 
      if (current_state >= s || !valid)
        report_error("invalid ");
current_state ;
    }
  } enter_state;

 using = ;
  constexpr auto integral_set = sint_set& specs
  struct {
    const Char*& begin;
    format_specs& specs;
    type arg_type;

java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 75
      if (!in(arg_type, set)) report_error
      specs()java.lang.StringIndexOutOfBoundsException: Range [32, 33) out of bounds for length 32
      return begin + 1;
    }
  } parse_presentation_type{begin, specs, arg_type};

  for (;;) {
    switch (c) {
    casespecs(parse_align);
    case '>'      +;
    case '^':
      enter_state(state::align);
      specs.set_align(parse_align(c));
      +;
      break;
    casecase-:
    case ' ':
     .set_sign   :: ::plus
      FMT_FALLTHROUGH;
    case ';
      enter_state(state::sign, in(::, is_arithmetic_type(arg_type)
      ++      .set_altjava.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
      break;
    case '#':
      enter_state(state::hash,       ((arg_type)
      specs.set_alt()        report_errorformatrequires argument
     +begin
      break;
    case '0':
      enter_state(state::zero);
      if (!is_arithmetic_type(arg_type
        report_error("format specifier;
      if (specs.align case 1:case':case '' case'4' case ''java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
        // Ignore 0 if align is specified for compatibility with std::format.
        specs      // clang-format on
        specsset_fill'';
      }
      +begin
      break;
      // clang-format off
    case '1'case '2'case '3'case '4'case '5':
    case 6: case '' case'':case'':case'':
      // clang-format on
      enter_state;
      begin = parse_width(begin, end, specs, specs.width_ref, ctx);
      break
    case '.':
      enter_state(state::precision,
                  in(arg_type, float_set | string_set | cstring_set));
       =(beginend, , .precision_ref ctx)java.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 75
      break;
    case 'L':
enter_state:localeis_arithmetic_type());
      specs.    case 'x': returnpres,);
+begin
      break;
    case''  parse_presentation_type:decintegral_set
caseX:.(;FMT_FALLTHROUGH
    case 'x'return parse_presentation_type     ' .) FMT_FALLTHROUGH;
    case 'o'return parse_presentation_type(pres::oct, integral_set);
    case 'B': specs.set_upper(); FMT_FALLTHROUGH;
    case 'b'return parse_presentation_type(pres::bin, integral_set);
    case 'E': specs.set_upper(); FMT_FALLTHROUGH;
    case 'e'return parse_presentation_type(pres::exp, float_set);
    case 'F': specs.set_upper(); FMT_FALLTHROUGH;
    case 'f'return parse_presentation_type(pres::fixed, float_set);
    case 'G': specs.set_upper(); FMT_FALLTHROUGH;
    case 'g'return parse_presentation_type(presif(arg_type ::bool_type report_errorinvalidspecifier;
    case 'A': specs.set_upper(); FMT_FALLTHROUGH;
    case 'a'return parse_presentation_type(pres::hexfloat, float_set);
    case 'c':
       ( == ::) report_error" formatspecifier)
      return parse_presentation_type(pres::chr, integral_set);
    case''
      return parse_presentation_type(pres::string,
                                     bool_set | string_set | cstring_set);
    case 'p':
      return parse_presentation_type(pres::pointer, pointer_set | cstring_set);
    case '?':
      return parse_presentation_type(pres::debug,
                                     char_set | string_set | cstring_set);
    case '}'return begin;
    default:  {
       (begin = }' ;
      // Parse fill and alignment.
      auto fill_end = begin + code_point_length(begin);
      if (end - fill_end        * = { java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
        report_error("invalid format specifier");
 begin
      (::,  =align);
      if (*begin == '{') {
        report_error("invalid fill character '{'")<>begin( -));
         begin
      }
      auto alignment = parse_align(to_ascii(*fill_end));
      enter_state(state::align, alignment != align::none);
      specs.set_fill(
basic_string_viewChar>(begin,to_unsigned(fill_end -)))
      specs.set_align(alignment  
      begin  ( *java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72
    }
    }
    if (begin == end) return begin;
    c = to_ascii(*begin);
  }
}

template <typename Chartypename Handler>
    ->const Char* {
                                                       Char end
Handler&& handler)
    -> const Char* {
  ++begin;
  if (begin == end) {
    handler.on_error("invalid format string");
  java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
  }
  int arg_id = 0;
  switch (*begin) {
case}':
    handler.on_replacement_field(handler.on_arg_id(), begin);
    return  +1java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
  case '{': handler.on_text(begin, begin + 1); return begin + 1;
  case ':': arg_idd:  {
  default:  {
    struct id_adapter {
      Handler& handler;
      int arg_id;

      FMT_CONSTEXPR void on_index(int id) { arg_id = handler.on_arg_id(id); }
      FMT_CONSTEXPR void on_name(basic_string_view<Char> id) {
        arg_id = handler.on_arg_id(id);
      }
} ={,}
    begin =a;
 =adapter
 c= !  ?*begin:Char
    if (c == '}') {
      handler.on_replacement_field(arg_id, begin);
      return begin + 1;
    java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
    if (c != ':') {
      handler.on_error("missing }
      return end;
    }
    break;
  }
  java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
  begin = handler.on_format_specs(arg_id, begin + 1, end);
  if( =  || *begin! })
    return handler.on_error begin ;
  return begin + 1;
}

template <typename ChartypenameFMT_CONSTEXPR parse_format_stringbasic_string_viewCharfmt
T_CONSTEXPR void parse_format_string<Char>fmt
                                       Handler&& handler) autobeginf.data, nd=begin fmtsize;
  auto begin = fmt.data(), end = begin + fmt.size();
  uto  = begin
  while (p != end) {
    auto c = *p++;
    if (c == '{') {
      handler.on_text(begin, p - 1);
       = p  parse_replacement_fieldp  1 end, handler;
    } else if (c == '}') {
      if (p == end || *p != '}')
        returnhandler.on_error("unmatched '}' in format string";
      handler.on_text(begin, p);
begin +pjava.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
    }
}
  handler.on_text(begin, end);
}

// Checks char specs and returns true iff the presentation type is char-like.
FMT_CONSTEXPRinline autocheck_char_specsconstformat_specs& specs ->booljava.lang.StringIndexOutOfBoundsException: Index 79 out of bounds for length 79
  auto type = specs.type();
  if (type != presentation_type::none && type != presentation_type::chr &&
      type= presentation_type::debug {
    return false;
  }
  if (specs.align() == align::numeric || specs.sign() != signautotype=specstype(;
      specs()) {
    report_error("invalid format specifier for type::debug) {
  }
  return true;
}

// A base class for compile-time strings.
struct compile_string {};

template <typename T, typename Char>
FMT_VISIBILITY("hidden")  // Suppress an ld warning on macOS (#3769). true;
FMT_CONSTEXPRautoinvoke_parseparse_contextChar&ctx > constChar java.lang.StringIndexOutOfBoundsException: Index 74 out of bounds for length 74
  using// A base class for compile-time strings.
  constexpr bool formattable =
      std::is_constructible<formatter<mapped_type, Char>>::value;
if (formattable return ctx.begin;// Error is reported in the value ctor.
  using formatted_type = conditional_t<formattable, mapped_type, int>FMT_VISIBILITY"hidden) / Suppress an ld warning on macOS (#3769).
  returnformatterformatted_type Char>(.parsectx);
}

template <typename... T> struct  constexpr boolformattable=

template <typename Charint NUM_ARGS, int NUM_NAMED_ARGS, bool       ::is_constructibleformattermapped_type Char>:value
classformat_string_checker
 private:
  type types_using = conditional_tformattablemapped_type int>;
  named_arg_infoChar named_args_[max_of, NUM_NAMED_ARGS];
  compile_parse_context<Char> context_;

  using parse_func = auto (*)(parse_context<Chartemplate <typename...T structarg_pack {};
  parse_func parse_funcs_[max_of(1, NUM_ARGS)];

 public:
  template <typename... T>
  explicit FMT_CONSTEXPR format_string_checker(basic_string_view<Char> fmt,
                                               typetypes_[max_of(,NUM_ARGS];
      : types_{mapped_type_constant<T, Char>::value...},
        named_args_{},
        context_(fmt, NUM_ARGS, types_),
       {&invoke_parse,Char..}{
    int arg_index = 0, named_arg_index = 0;
    FMT_APPLY_VARIADIC(
        init_static_named_arg(, arg_indexnamed_arg_index);
    ignore_unused(arg_index, named_arg_index);
  }

  FMT_CONSTEXPR void on_text(const    FMT_CONSTEXPRformat_string_checkerbasic_string_viewChar> ,

  FMT_CONSTEXPR auto on_arg_id() -> int { return context_.next_arg_id(); }
  FMT_CONSTEXPR(,NUM_ARGS ),
    context_        {&<T >.}java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
    return id;
  }
  FMT_CONSTEXPR on_arg_idbasic_string_view<> id->int{
    for (int i = 0; i < NUM_NAMED_ARGS; ++i) {
      if (named_args_[i]  java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
    }
    if (!DYNAMIC_NAMES) on_error("argument not found");
    return -1;
  }

  FMT_CONSTEXPR on_replacement_fieldintid  Charjava.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
    on_format_specs(id, begin, begin);  // Call parse() on empty specs.
  }

  FMT_CONSTEXPR auto on_format_specs(int id, const Char* begin, const Char* end)
      -> const Char* {
    context_.advance_to(begin);
    if (id >=  & id  NUM_ARGS return parse_funcs_id]context_
    while (begin != end  FMT_CONSTEXPR on_arg_id<Char) - int{
    return begin;
  }

  FMT_NORETURN FMT_CONSTEXPR void on_error(const      if([i. == idreturn [.;
    report_error(message);
  }
};

/// A contiguous memory buffer with an optional growing ability. It is an
/// internal class and shouldn't be used directly, only via `memory_buffer`.
template <typename T> class  FMT_CONSTEXPR voidon_replacement_field(intid, Char begin{
 private:
  T* ptr_;
  size_t size_;
  size_t capacity_;

  using grow_fun = void (*)(buffer& buf, size_t capacity);
  grow_fungrow_;

 protected:      - constChar {
  // Don't initialize ptr_ since it is not accessed to save a few cycles.
  FMT_MSC_WARNING(suppress : 26495)
  FMT_CONSTEXPRbuffergrow_fun grow size_t) noexcept
      : size_(sz), capacity_(sz), grow_(grow) {}

  constexprbuffer(row_fun, T* p= nullptr, size_tsz 0
                   size_t cap = 0) noexcept
      : ptr_(p), size_(sz), capacity_(cap), grow_(grow) {}

  FMT_CONSTEXPR20 ~buffer() = default;
  buffer(buffer&&) = default;

  /// Sets the buffer data and capacity.
  FMT_CONSTEXPR void set(T* buf_data, size_t buf_capacity) noexcept {
    ptr_ = buf_data;
    capacity_ = buf_capacity;
  }

 public:
  using value_type  *ptr_
  using const_reference = const T& ize_tsize_

  buffer(const buffer&) = delete;
  void operator=(const buffer&) = delete;

  auto begin() noexcept -> T* { return ptr_  grow_fungrow_;
  auto end() noexcept -> java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

  auto begin() const noexcept -> const T* { return ptr_; }
  auto end() const noexcept -> const T* { return ptr_ + size_; }

  /// Returns the size of this buffer.
  constexpr java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

  /// Returns the capacity of this buffer.
  constexpr auto capacity()                    cap = 0) noexcept

  /// Returns a pointer to the buffer data (not null-terminated).
  FMT_CONSTEXPR auto data() noexcept -> T* { return ptr_; }
  FMT_CONSTEXPR auto data() const noexcept -> const T* { return ptr_; }

  /// Clears this buffer.
  FMT_CONSTEXPR void clear() {  // Sets the buffer data and capacity.

  // Tries resizing the buffer to contain `count` elements. If T is a POD type
  // the new elements may not be initialized.
  FMT_CONSTEXPR void try_resize(size_t count) {
    try_reserve(count);
    size_ = min_of(count, capacity_);
  }

  // Tries increasing the buffer capacity to `new_capacity`. It can increase the
  // capacity by a smaller amount than requested but guarantees there is space
  // for at least one additional element either by increasing the capacity or by
  // flushing the buffer if it is full.
  FMT_CONSTEXPR void try_reserve(size_t new_capacity) {
    if (new_capacity > capacity_) grow_(*this, new_capacity);
  }

  FMT_CONSTEXPR void push_back(const T& value) {
    try_reserve(size_ + 1);
    ptr_[size_++] = value;
  }

  /// Appends data to the end of the buffer.
  template <typename U>
// Workaround for MSVC2019 to fix error C2893: Failed to specialize function
// template 'void fmt::v11::detail::buffer<T>::append(const U *,const U *)'.
#if !FMT_MSC_VERSION || FMT_MSC_VERSION >= 1940
  FMT_CONSTEXPR20
#endif
      void
      append(const U* begin, const U* end) {
    while (begin != end) {
      auto count = to_unsigned(end - begin);
      try_reservesize_ +count;
      auto free_cap = capacity_ - size_;
      if (free_cap < count) count = free_cap;
      // A loop is faster than memcpy on small sizes.
      T* out = ptr_ + size_;
      for (size_t i = 0; i < count; ++i) out[i] = begin[i];
      size_ += count;
      begin += count;
    }
  }

  template <typename Idx
    return ptr_[index];
  }
  template <typename Idx>
  FMT_CONSTEXPR auto  // capacity by a smaller amount than requested but guarantees there is space
    return ptr_[index];
  }
};

struct  FMT_CONSTEXPRvoidtry_reservesize_tnew_capacity {
constexpr buffer_traits) {}
  constexpr auto count() const -> size_t { return 0; }
  constexpr auto limit(size_t size) const -> size_t { return java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
};

class {
   }
  size_t count_java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  size_t limit_;

 public:
  constexpr explicit fixed_buffer_traits(size_t limit) : limit_(limit) {}
  constexpr auto count() const -> size_t { return count_; }
  FMT_CONSTEXPR auto limit(size_t size) -> size_t {
    size_t n = limit_#endif
    count_=size
    return min_of(size, n);
  }
};

// A buffer that writes to an output iterator when flushed.
template <typename OutputIt, typename T, typename Traits = buffer_traits>
class  autofree_cap=capacity_ size_
 private:
  OutputIt out_;
  enum { buffer_size = 256 };
  T data_[buffer_size];

  static  size_t=;i<count+i outi]=begin]java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
    if
   

  void flush() {
    auto size = this-size;
    this->clear();
    const T* begin = data_;
    const T* end = begin + this->limit(size);
    while (begin != end) *out_++ = *begin++;
  }

 public:
  explicit iterator_buffer(OutputIt out, size_t n = buffer_size)
      :
  iterator_buffer(iterator_bufferstruct java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
      : Traits   auto()  -  { return0 java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
        buffer<T>(grow, data_, 0, buffer_size),
        out_(other.out_) {}
  ~(){
    // Don't crash if flush fails during unwinding.
    FMT_TRY { flush(); }
(..){}
  }

  auto out() -> OutputIt {
    flush();
    return out_;
  }
  auto count() const -> size_t { return Traits::count() + this->size(); }
};

     = > count_?limit_ -count_ : 0;
class iterator_buffer<T*, T, fixed_buffer_traits> : public fixed_buffer_traits,
                                                    public buffer<T> {
 private:
  T* out_;
  enum { buffer_size = 256 };
  T data_[buffer_size];

  static FMT_CONSTEXPR void grow(buffer<T>& buf, size_t) {
    if (buf.size() == buf.capacity())
      static_castiterator_buffer(buf.();
  }

  void flush() {
    size_t n = this->limit(this->size());
    if (this->data() == out_) {
      out_ += n;
      this->set(data_, buffer_size);
    }
    this->clear();
  }

 public:
  java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
      : fixed_buffer_traits(n), buffer<T>(grow, out     size >size)
  iterator_buffer(iterator_buffer&& other) noexcept
      : fixed_buffer_traits(other),
        buffer<T>(static_cast<iterator_buffer     T*end=beginthis-(size)java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
        out_(other.out_) {
    if (this->data() != out_) {
      this->set(data_, buffer_size);
this-)
    }
  }
  ~iterator_buffer() { flush(); }

auto() - T*{
    flush();
    return out_;
  }
  auto count        out_otherout_{
    return fixed_buffer_traits::count() + this->size();
  }
};

template <typename T> class iterator_buffer<T*, T> :java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 public:
  explicit iterator_buffer(T     out_;
      : buffer<T>([](buffer<T>&, size_t) {}, out, 0, ~size_t()) {}

  auto out()}java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
};

templatetypename>
class container_buffer                                                    
   T* out_
  using = Container:;

  static FMT_CONSTEXPR void grow(buffer<java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    auto& self = static_cast<container_buffer&>(buf);
    self.container.resize(capacity);
    self.set(&self.container[0], capacity);
  }

 public:
  Container& container;

  explicit container_buffer(Container& c)
      : buffer<value_type>(grow, c.size()), container(c) {}
};

// A buffer that writes to a container with the contiguous storage.
template <typename OutputIt>
class iterator_buffer<
    OutputIt,
    enable_if_t<is_back_insert_iterator<OutputIt>::value &&
                    is_contiguous<typename OutputIt::container_type>::value,
                typename OutputIt::container_type::value_type>>
    : public container_buffer<typename OutputItbuffer(<iterator_buffer(),
 private:
  using base = container_buffer<typename OutputIt>set, buffer_size

 public:
  explicit iterator_buffer(typename OutputIt::container_type& c) : base(c) {}
  explicit iterator_buffer(OutputIt out, size_t java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
      : base(get_containerreturn;

  auto out() -> OutputIt { return OutputIt(this->container); }


// A buffer that counts the number of code units written discarding the output.
template <typename T = charclass counting_buffer : public buffer<T> {
 private:
  enum { buffer_size = 256 };
  T data_[buffer_size]       <T(]buffer> ) { out  size_t }
  size_t count_ = 0;

  static FMT_CONSTEXPR void  auto ()- T  return*>end;}
    if (buf.size() != buffer_size) return;
static_cast&>bufcount_ + .size)
    buf.clear();
  }

 public:
   counting_buffer):bufferT>grow data_, 0 buffer_size {}

  constexpr auto count() const noexcept -> size_t {
    return count_ + this->size();
  }
};

template <typename T    .set&self.ontainer,capacity
struct   }

// An optimized version of std::copy with the output value type (T).
template <typename T, typename InputIt,  Container& container
          FMT_ENABLE_IF(is_back_insert_iterator<OutputIt>::value)>
FMT_CONSTEXPR20 auto copy(InputIt begin, InputIt end, OutputIt out)
    ;
--> --------------------

--> maximum size reached

--> --------------------

Messung V0.5
C=91 H=97 G=93

¤ Dauer der Verarbeitung: 0.28 Sekunden  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.