Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test/compile-test.cc:339:21: error: consteval function 'test_format not a constant expression. #2205

Closed
denchat opened this issue Apr 1, 2021 · 20 comments · Fixed by #2216
Closed

Comments

@denchat
Copy link
Contributor

denchat commented Apr 1, 2021

In test-enabled cmake, I got this error

fmt-master/test/compile-test.cc:339:21: error: call to consteval function 'test_format<5, char, bool, FMT_COMPILE_STRING>' is not a constant expression
   EXPECT_EQ("true", test_format<5>(FMT_COMPILE("{}"), true));

compiler: clang 12 from https://llvm.org/builds/ in --target=x86_64-w64-windows-gnu mode

Any ideas?

@vitaut
Copy link
Contributor

vitaut commented Apr 1, 2021

Fixed in 7c43f8b. Thanks for reporting.

@vitaut vitaut closed this as completed Apr 1, 2021
@denchat
Copy link
Contributor Author

denchat commented Apr 2, 2021

I have re-downloaded master but it's still there.

>ninja -j 2
[1/37] Building CXX object test/CMakeFiles/compile-test.dir/compile-test.cc.obj
FAILED: test/CMakeFiles/compile-test.dir/compile-test.cc.obj
C:\PROGRA~1\LLVM\bin\CLANG_~1.EXE -DFMT_LOCALE -DFMT_SHARED -DGTEST_HAS_STD_WSTRING=1 -DGTEST_LANG_CXX11=1 -D_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING=1 -IC:/Users/User/AppData/Roaming/fmt-master/include -isystem C:/Users/User/AppData/Roaming/fmt-master/test/gtest -isystem C:/Users/User/AppData/Roaming/fmt-master/test/gmock -isystem C:/Users/User/AppData/Roaming/fmt-master/test/. -fuse-ld=lld --target=x86_64-w64-windows-gnu --driver-mode=g++ -O3 -std=gnu++2b -static-libgcc -static-libstdc++ -lwinpthread -DNDEBUG -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_STDIO_ISO_WIDE_SPECIFIERS -Wno-unused-command-line-argument -O3 -DNDEBUG -fno-delete-null-pointer-checks -std=gnu++2b -MD -MT test/CMakeFiles/compile-test.dir/compile-test.cc.obj -MF test\CMakeFiles\compile-test.dir\compile-test.cc.obj.d -o test/CMakeFiles/compile-test.dir/compile-test.cc.obj -c C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:341:22: error: call to consteval function 'test_format<6, char, bool, FMT_COMPILE_STRING>' is not a constant expression
  EXPECT_EQ("true ", test_format<6>(FMT_COMPILE("{:5}"), true));

@denchat
Copy link
Contributor Author

denchat commented Apr 2, 2021

It seems "consteval phase" happens after "constexpr phase".
This prohibits constexpr from calling consteval.

consteval int twoex(int n) { return 2*n; }
constexpr int twoex_constexpr(int n) { return 2*n; }

// constexpr is "already" constexpr "before" consteval evaluation
consteval int fourex(int n) { return 2*twoex_constexpr(n); }

// consteval is not evaluated "in between" constexpr context
// constexpr int fourex_constexpr(int n) { return 2*twoex(n); }  // won't compile

// consteval is evaluated "in between" consteval context
consteval int eightex(int n) { return 4*twoex(n); }

[LIVE]

@vitaut vitaut reopened this Apr 2, 2021
@vitaut
Copy link
Contributor

vitaut commented Apr 2, 2021

I was not able to repro the issue. clang's trunk compiles this correctly (https://compiler-explorer.com/z/71s4G3aW8):

#include <fmt/compile.h>

template <size_t max_string_length, typename Char = char> struct test_string {
  template <typename T> constexpr bool operator==(const T& rhs) const noexcept {
    return fmt::basic_string_view<Char>(rhs).compare(buffer.data()) == 0;
  }
  std::array<Char, max_string_length> buffer{};
};

template <size_t max_string_length, typename Char = char, typename... Args>
consteval auto test_format(auto format, const Args&... args) {
  test_string<max_string_length, Char> string{};
  fmt::format_to(string.buffer.data(), format, args...);
  return string;
}

int main() {
  constexpr auto s = test_format<6>(FMT_COMPILE("{:5}"), true);
}

Note that the latest released version of clang is 11 so you are probably using a development version.

@vitaut vitaut closed this as completed Apr 2, 2021
@denchat
Copy link
Contributor Author

denchat commented Apr 6, 2021

This is output of clang 12.

C:\Users\User\AppData\Roaming\fmt>cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_MAKE_PROGRAM="C:/Program Files (x86)/Ninja/ninja.exe" -DCMAKE_SYSTEM_NAME=Windows -DCMAKE_CXX_STANDARD=20 -DCMAKE_CXX_COMPILER="C:/Program Files/LLVM/bin/clang-cl.exe" -DCMAKE_CXX_FLAGS="-fuse-ld=lld --target=x86_64-w64-windows-gnu --driver-mode=g++ -O3 -std=gnu++20 -static-libgcc -static-libstdc++ -lwinpthread -DNDEBUG -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_STDIO_ISO_WIDE_SPECIFIERS -Wno-unused-command-line-argument" -DCMAKE_CXX_LINK_EXECUTABLE="C:/Program Files/LLVM/bin/lld.exe" -DBUILD_SHARED_LIBS=NO -DFMT_INSTALL=NO -DFMT_DOC=NO -DFMT_TEST=YES "C:/Users/User/AppData/Roaming/fmt-master"
-- CMake version: 3.20.0
-- The CXX compiler identification is Clang 12.0.4
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files/LLVM/bin/clang-cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Version: 7.1.3
-- Build type: Release
-- CXX_STANDARD: 20
-- Performing Test has_std_20_flag
-- Performing Test has_std_20_flag - Success
-- Performing Test has_std_2a_flag
-- Performing Test has_std_2a_flag - Success
-- Performing Test SUPPORTS_USER_DEFINED_LITERALS
-- Performing Test SUPPORTS_USER_DEFINED_LITERALS - Success
-- Performing Test FMT_HAS_VARIANT
-- Performing Test FMT_HAS_VARIANT - Success
-- Required features: cxx_variadic_templates
-- Performing Test HAS_NULLPTR_WARNING
-- Performing Test HAS_NULLPTR_WARNING - Success
-- Looking for _strtod_l
-- Looking for _strtod_l - found
-- Performing Test FMT_HAS_MBIG_OBJ
-- Performing Test FMT_HAS_MBIG_OBJ - Failed
-- Looking for C++ include pthread.h
-- Looking for C++ include pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Performing Test HAVE_FNO_DELETE_NULL_POINTER_CHECKS
-- Performing Test HAVE_FNO_DELETE_NULL_POINTER_CHECKS - Success
-- FMT_PEDANTIC: OFF
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Users/User/AppData/Roaming/fmt

C:\Users\User\AppData\Roaming\fmt>ninja -j 2
[14/51] Building CXX object test/CMakeFiles/compile-test.dir/compile-test.cc.obj
FAILED: test/CMakeFiles/compile-test.dir/compile-test.cc.obj
C:\PROGRA~1\LLVM\bin\clang-cl.exe -DFMT_LOCALE -DGTEST_HAS_STD_WSTRING=1 -DGTEST_LANG_CXX11=1 -D_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING=1 -IC:/Users/User/AppData/Roaming/fmt-master/include -isystem C:/Users/User/AppData/Roaming/fmt-master/test/gtest -isystem C:/Users/User/AppData/Roaming/fmt-master/test/gmock -isystem C:/Users/User/AppData/Roaming/fmt-master/test/. -fuse-ld=lld --target=x86_64-w64-windows-gnu --driver-mode=g++ -O3 -std=gnu++20 -static-libgcc -static-libstdc++ -lwinpthread -DNDEBUG -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_STDIO_ISO_WIDE_SPECIFIERS -Wno-unused-command-line-argument -O3 -DNDEBUG -fno-delete-null-pointer-checks -std=gnu++20 -MD -MT test/CMakeFiles/compile-test.dir/compile-test.cc.obj -MF test\CMakeFiles\compile-test.dir\compile-test.cc.obj.d -o test/CMakeFiles/compile-test.dir/compile-test.cc.obj -c C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:342:18: error: call to consteval function 'test_format<2, char, bool, FMT_COMPILE_STRING>' is not a constant expression
  EXPECT_EQ("1", test_format<2>(FMT_COMPILE("{:d}"), true));
                 ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:1717:14: note: read of element of array without known bound is not allowed in a constant expression
    prefix = data::prefixes[specs.sign];
             ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:2309:19: note: in call to 'write_int(&string.buffer._M_elems[0], 1, specs, {nullptr})'
    return out_ = detail::write_int(out_, value, specs_, locale_);
                  ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:2319:51: note: in call to '&af(ctx, specs)->operator()(1)'
    if (specs_.type && specs_.type != 's') return (*this)(value ? 1 : 0);
                                                  ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/core.h:1372:12: note: in call to '&af(ctx, specs)->operator()(true)'
    return vis(arg.value_.bool_value);
           ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:3528:12: note: in call to 'visit_format_arg(af(ctx, specs), detail::make_arg<fmt::basic_format_context<char *, char>>(val))'
    return visit_format_arg(af(ctx, specs),
           ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:599:16: note: in call to '&compiled.fmt->format(true, ctx)'
    return fmt.format(arg, ctx);
               ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:836:13: note: in call to '&compiled->format(&string.buffer._M_elems[0], true)'
  return cf.format(out, args...);
            ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:907:12: note: in call to 'format_to(&string.buffer._M_elems[0], compiled, true)'
    return format_to(out, compiled, std::forward<Args>(args)...);
           ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:334:3: note: in call to 'format_to(&string.buffer._M_elems[0], format, true)'
  fmt::format_to(string.buffer.data(), format, args...);
  ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:342:18: note: in call to 'test_format({{}}, true)'
  EXPECT_EQ("1", test_format<2>(FMT_COMPILE("{:d}"), true));
                 ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:352:20: error: call to consteval function 'test_format<4, char, int, FMT_COMPILE_STRING>' is not a constant expression
  EXPECT_EQ("+42", test_format<4>(FMT_COMPILE("{:+}"), 42));
                   ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:1717:14: note: indexing of array without known bound is not allowed in a constant expression
    prefix = data::prefixes[specs.sign];
             ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:2309:19: note: in call to 'write_int(&string.buffer._M_elems[0], 42, specs, {nullptr})'
    return out_ = detail::write_int(out_, value, specs_, locale_);
                  ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/core.h:1354:12: note: in call to '&af(ctx, specs)->operator()(42)'
    return vis(arg.value_.int_value);
           ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:3528:12: note: in call to 'visit_format_arg(af(ctx, specs), detail::make_arg<fmt::basic_format_context<char *, char>>(val))'
    return visit_format_arg(af(ctx, specs),
           ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:599:16: note: in call to '&compiled.fmt->format(42, ctx)'
    return fmt.format(arg, ctx);
               ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:836:13: note: in call to '&compiled->format(&string.buffer._M_elems[0], 42)'
  return cf.format(out, args...);
            ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:907:12: note: in call to 'format_to(&string.buffer._M_elems[0], compiled, 42)'
    return format_to(out, compiled, std::forward<Args>(args)...);
           ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:334:3: note: in call to 'format_to(&string.buffer._M_elems[0], format, 42)'
  fmt::format_to(string.buffer.data(), format, args...);
  ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:352:20: note: in call to 'test_format({{}}, 42)'
  EXPECT_EQ("+42", test_format<4>(FMT_COMPILE("{:+}"), 42));
                   ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:353:19: error: call to consteval function 'test_format<3, char, int, FMT_COMPILE_STRING>' is not a constant expression
  EXPECT_EQ("42", test_format<3>(FMT_COMPILE("{:-}"), 42));
                  ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:1717:14: note: indexing of array without known bound is not allowed in a constant expression
    prefix = data::prefixes[specs.sign];
             ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:2309:19: note: in call to 'write_int(&string.buffer._M_elems[0], 42, specs, {nullptr})'
    return out_ = detail::write_int(out_, value, specs_, locale_);
                  ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/core.h:1354:12: note: in call to '&af(ctx, specs)->operator()(42)'
    return vis(arg.value_.int_value);
           ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:3528:12: note: in call to 'visit_format_arg(af(ctx, specs), detail::make_arg<fmt::basic_format_context<char *, char>>(val))'
    return visit_format_arg(af(ctx, specs),
           ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:599:16: note: in call to '&compiled.fmt->format(42, ctx)'
    return fmt.format(arg, ctx);
               ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:836:13: note: in call to '&compiled->format(&string.buffer._M_elems[0], 42)'
  return cf.format(out, args...);
            ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:907:12: note: in call to 'format_to(&string.buffer._M_elems[0], compiled, 42)'
    return format_to(out, compiled, std::forward<Args>(args)...);
           ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:334:3: note: in call to 'format_to(&string.buffer._M_elems[0], format, 42)'
  fmt::format_to(string.buffer.data(), format, args...);
  ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:353:19: note: in call to 'test_format({{}}, 42)'
  EXPECT_EQ("42", test_format<3>(FMT_COMPILE("{:-}"), 42));
                  ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:354:20: error: call to consteval function 'test_format<4, char, int, FMT_COMPILE_STRING>' is not a constant expression
  EXPECT_EQ(" 42", test_format<4>(FMT_COMPILE("{: }"), 42));
                   ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:1717:14: note: indexing of array without known bound is not allowed in a constant expression
    prefix = data::prefixes[specs.sign];
             ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:2309:19: note: in call to 'write_int(&string.buffer._M_elems[0], 42, specs, {nullptr})'
    return out_ = detail::write_int(out_, value, specs_, locale_);
                  ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/core.h:1354:12: note: in call to '&af(ctx, specs)->operator()(42)'
    return vis(arg.value_.int_value);
           ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:3528:12: note: in call to 'visit_format_arg(af(ctx, specs), detail::make_arg<fmt::basic_format_context<char *, char>>(val))'
    return visit_format_arg(af(ctx, specs),
           ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:599:16: note: in call to '&compiled.fmt->format(42, ctx)'
    return fmt.format(arg, ctx);
               ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:836:13: note: in call to '&compiled->format(&string.buffer._M_elems[0], 42)'
  return cf.format(out, args...);
            ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:907:12: note: in call to 'format_to(&string.buffer._M_elems[0], compiled, 42)'
    return format_to(out, compiled, std::forward<Args>(args)...);
           ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:334:3: note: in call to 'format_to(&string.buffer._M_elems[0], format, 42)'
  fmt::format_to(string.buffer.data(), format, args...);
  ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:354:20: note: in call to 'test_format({{}}, 42)'
  EXPECT_EQ(" 42", test_format<4>(FMT_COMPILE("{: }"), 42));
                   ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:358:23: error: call to consteval function 'test_format<7, char, int, FMT_COMPILE_STRING>' is not a constant expression
  EXPECT_EQ("101010", test_format<7>(FMT_COMPILE("{:b}"), 42));
                      ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:1717:14: note: read of element of array without known bound is not allowed in a constant expression
    prefix = data::prefixes[specs.sign];
             ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:2309:19: note: in call to 'write_int(&string.buffer._M_elems[0], 42, specs, {nullptr})'
    return out_ = detail::write_int(out_, value, specs_, locale_);
                  ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/core.h:1354:12: note: in call to '&af(ctx, specs)->operator()(42)'
    return vis(arg.value_.int_value);
           ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:3528:12: note: in call to 'visit_format_arg(af(ctx, specs), detail::make_arg<fmt::basic_format_context<char *, char>>(val))'
    return visit_format_arg(af(ctx, specs),
           ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:599:16: note: in call to '&compiled.fmt->format(42, ctx)'
    return fmt.format(arg, ctx);
               ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:836:13: note: in call to '&compiled->format(&string.buffer._M_elems[0], 42)'
  return cf.format(out, args...);
            ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:907:12: note: in call to 'format_to(&string.buffer._M_elems[0], compiled, 42)'
    return format_to(out, compiled, std::forward<Args>(args)...);
           ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:334:3: note: in call to 'format_to(&string.buffer._M_elems[0], format, 42)'
  fmt::format_to(string.buffer.data(), format, args...);
  ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:358:23: note: in call to 'test_format({{}}, 42)'
  EXPECT_EQ("101010", test_format<7>(FMT_COMPILE("{:b}"), 42));
                      ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:359:25: error: call to consteval function 'test_format<9, char, int, FMT_COMPILE_STRING>' is not a constant expression
  EXPECT_EQ("0b101010", test_format<9>(FMT_COMPILE("{:#b}"), 42));
                        ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:1717:14: note: read of element of array without known bound is not allowed in a constant expression
    prefix = data::prefixes[specs.sign];
             ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:2309:19: note: in call to 'write_int(&string.buffer._M_elems[0], 42, specs, {nullptr})'
    return out_ = detail::write_int(out_, value, specs_, locale_);
                  ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/core.h:1354:12: note: in call to '&af(ctx, specs)->operator()(42)'
    return vis(arg.value_.int_value);
           ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:3528:12: note: in call to 'visit_format_arg(af(ctx, specs), detail::make_arg<fmt::basic_format_context<char *, char>>(val))'
    return visit_format_arg(af(ctx, specs),
           ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:599:16: note: in call to '&compiled.fmt->format(42, ctx)'
    return fmt.format(arg, ctx);
               ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:836:13: note: in call to '&compiled->format(&string.buffer._M_elems[0], 42)'
  return cf.format(out, args...);
            ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:907:12: note: in call to 'format_to(&string.buffer._M_elems[0], compiled, 42)'
    return format_to(out, compiled, std::forward<Args>(args)...);
           ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:334:3: note: in call to 'format_to(&string.buffer._M_elems[0], format, 42)'
  fmt::format_to(string.buffer.data(), format, args...);
  ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:359:25: note: in call to 'test_format({{}}, 42)'
  EXPECT_EQ("0b101010", test_format<9>(FMT_COMPILE("{:#b}"), 42));
                        ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:360:25: error: call to consteval function 'test_format<9, char, int, FMT_COMPILE_STRING>' is not a constant expression
  EXPECT_EQ("0B101010", test_format<9>(FMT_COMPILE("{:#B}"), 42));
                        ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:1717:14: note: read of element of array without known bound is not allowed in a constant expression
    prefix = data::prefixes[specs.sign];
             ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:2309:19: note: in call to 'write_int(&string.buffer._M_elems[0], 42, specs, {nullptr})'
    return out_ = detail::write_int(out_, value, specs_, locale_);
                  ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/core.h:1354:12: note: in call to '&af(ctx, specs)->operator()(42)'
    return vis(arg.value_.int_value);
           ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:3528:12: note: in call to 'visit_format_arg(af(ctx, specs), detail::make_arg<fmt::basic_format_context<char *, char>>(val))'
    return visit_format_arg(af(ctx, specs),
           ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:599:16: note: in call to '&compiled.fmt->format(42, ctx)'
    return fmt.format(arg, ctx);
               ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:836:13: note: in call to '&compiled->format(&string.buffer._M_elems[0], 42)'
  return cf.format(out, args...);
            ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:907:12: note: in call to 'format_to(&string.buffer._M_elems[0], compiled, 42)'
    return format_to(out, compiled, std::forward<Args>(args)...);
           ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:334:3: note: in call to 'format_to(&string.buffer._M_elems[0], format, 42)'
  fmt::format_to(string.buffer.data(), format, args...);
  ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:360:25: note: in call to 'test_format({{}}, 42)'
  EXPECT_EQ("0B101010", test_format<9>(FMT_COMPILE("{:#B}"), 42));
                        ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:361:20: error: call to consteval function 'test_format<4, char, int, FMT_COMPILE_STRING>' is not a constant expression
  EXPECT_EQ("042", test_format<4>(FMT_COMPILE("{:#o}"), 042));
                   ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:1717:14: note: read of element of array without known bound is not allowed in a constant expression
    prefix = data::prefixes[specs.sign];
             ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:2309:19: note: in call to 'write_int(&string.buffer._M_elems[0], 34, specs, {nullptr})'
    return out_ = detail::write_int(out_, value, specs_, locale_);
                  ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/core.h:1354:12: note: in call to '&af(ctx, specs)->operator()(34)'
    return vis(arg.value_.int_value);
           ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:3528:12: note: in call to 'visit_format_arg(af(ctx, specs), detail::make_arg<fmt::basic_format_context<char *, char>>(val))'
    return visit_format_arg(af(ctx, specs),
           ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:599:16: note: in call to '&compiled.fmt->format(34, ctx)'
    return fmt.format(arg, ctx);
               ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:836:13: note: in call to '&compiled->format(&string.buffer._M_elems[0], 34)'
  return cf.format(out, args...);
            ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:907:12: note: in call to 'format_to(&string.buffer._M_elems[0], compiled, 34)'
    return format_to(out, compiled, std::forward<Args>(args)...);
           ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:334:3: note: in call to 'format_to(&string.buffer._M_elems[0], format, 34)'
  fmt::format_to(string.buffer.data(), format, args...);
  ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:361:20: note: in call to 'test_format({{}}, 34)'
  EXPECT_EQ("042", test_format<4>(FMT_COMPILE("{:#o}"), 042));
                   ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:362:21: error: call to consteval function 'test_format<5, char, int, FMT_COMPILE_STRING>' is not a constant expression
  EXPECT_EQ("0x4a", test_format<5>(FMT_COMPILE("{:#x}"), 0x4a));
                    ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:1717:14: note: read of element of array without known bound is not allowed in a constant expression
    prefix = data::prefixes[specs.sign];
             ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:2309:19: note: in call to 'write_int(&string.buffer._M_elems[0], 74, specs, {nullptr})'
    return out_ = detail::write_int(out_, value, specs_, locale_);
                  ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/core.h:1354:12: note: in call to '&af(ctx, specs)->operator()(74)'
    return vis(arg.value_.int_value);
           ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:3528:12: note: in call to 'visit_format_arg(af(ctx, specs), detail::make_arg<fmt::basic_format_context<char *, char>>(val))'
    return visit_format_arg(af(ctx, specs),
           ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:599:16: note: in call to '&compiled.fmt->format(74, ctx)'
    return fmt.format(arg, ctx);
               ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:836:13: note: in call to '&compiled->format(&string.buffer._M_elems[0], 74)'
  return cf.format(out, args...);
            ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:907:12: note: in call to 'format_to(&string.buffer._M_elems[0], compiled, 74)'
    return format_to(out, compiled, std::forward<Args>(args)...);
           ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:334:3: note: in call to 'format_to(&string.buffer._M_elems[0], format, 74)'
  fmt::format_to(string.buffer.data(), format, args...);
  ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:362:21: note: in call to 'test_format({{}}, 74)'
  EXPECT_EQ("0x4a", test_format<5>(FMT_COMPILE("{:#x}"), 0x4a));
                    ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:363:21: error: call to consteval function 'test_format<5, char, int, FMT_COMPILE_STRING>' is not a constant expression
  EXPECT_EQ("0X4A", test_format<5>(FMT_COMPILE("{:#X}"), 0x4a));
                    ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:1717:14: note: read of element of array without known bound is not allowed in a constant expression
    prefix = data::prefixes[specs.sign];
             ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:2309:19: note: in call to 'write_int(&string.buffer._M_elems[0], 74, specs, {nullptr})'
    return out_ = detail::write_int(out_, value, specs_, locale_);
                  ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/core.h:1354:12: note: in call to '&af(ctx, specs)->operator()(74)'
    return vis(arg.value_.int_value);
           ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:3528:12: note: in call to 'visit_format_arg(af(ctx, specs), detail::make_arg<fmt::basic_format_context<char *, char>>(val))'
    return visit_format_arg(af(ctx, specs),
           ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:599:16: note: in call to '&compiled.fmt->format(74, ctx)'
    return fmt.format(arg, ctx);
               ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:836:13: note: in call to '&compiled->format(&string.buffer._M_elems[0], 74)'
  return cf.format(out, args...);
            ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:907:12: note: in call to 'format_to(&string.buffer._M_elems[0], compiled, 74)'
    return format_to(out, compiled, std::forward<Args>(args)...);
           ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:334:3: note: in call to 'format_to(&string.buffer._M_elems[0], format, 74)'
  fmt::format_to(string.buffer.data(), format, args...);
  ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:363:21: note: in call to 'test_format({{}}, 74)'
  EXPECT_EQ("0X4A", test_format<5>(FMT_COMPILE("{:#X}"), 0x4a));
                    ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:365:22: error: call to consteval function 'test_format<6, char, int, FMT_COMPILE_STRING>' is not a constant expression
  EXPECT_EQ("   42", test_format<6>(FMT_COMPILE("{:5}"), 42));
                     ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:1717:14: note: read of element of array without known bound is not allowed in a constant expression
    prefix = data::prefixes[specs.sign];
             ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:2309:19: note: in call to 'write_int(&string.buffer._M_elems[0], 42, specs, {nullptr})'
    return out_ = detail::write_int(out_, value, specs_, locale_);
                  ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/core.h:1354:12: note: in call to '&af(ctx, specs)->operator()(42)'
    return vis(arg.value_.int_value);
           ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:3528:12: note: in call to 'visit_format_arg(af(ctx, specs), detail::make_arg<fmt::basic_format_context<char *, char>>(val))'
    return visit_format_arg(af(ctx, specs),
           ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:599:16: note: in call to '&compiled.fmt->format(42, ctx)'
    return fmt.format(arg, ctx);
               ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:836:13: note: in call to '&compiled->format(&string.buffer._M_elems[0], 42)'
  return cf.format(out, args...);
            ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:907:12: note: in call to 'format_to(&string.buffer._M_elems[0], compiled, 42)'
    return format_to(out, compiled, std::forward<Args>(args)...);
           ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:334:3: note: in call to 'format_to(&string.buffer._M_elems[0], format, 42)'
  fmt::format_to(string.buffer.data(), format, args...);
  ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:365:22: note: in call to 'test_format({{}}, 42)'
  EXPECT_EQ("   42", test_format<6>(FMT_COMPILE("{:5}"), 42));
                     ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:366:22: error: call to consteval function 'test_format<6, char, long long, FMT_COMPILE_STRING>' is not a constant expression
  EXPECT_EQ("   42", test_format<6>(FMT_COMPILE("{:5}"), 42ll));
                     ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:1717:14: note: read of element of array without known bound is not allowed in a constant expression
    prefix = data::prefixes[specs.sign];
             ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:2309:19: note: in call to 'write_int(&string.buffer._M_elems[0], 42, specs, {nullptr})'
    return out_ = detail::write_int(out_, value, specs_, locale_);
                  ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/core.h:1358:12: note: in call to '&af(ctx, specs)->operator()(42)'
    return vis(arg.value_.long_long_value);
           ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:3528:12: note: in call to 'visit_format_arg(af(ctx, specs), detail::make_arg<fmt::basic_format_context<char *, char>>(val))'
    return visit_format_arg(af(ctx, specs),
           ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:599:16: note: in call to '&compiled.fmt->format(42LL, ctx)'
    return fmt.format(arg, ctx);
               ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:836:13: note: in call to '&compiled->format(&string.buffer._M_elems[0], 42LL)'
  return cf.format(out, args...);
            ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:907:12: note: in call to 'format_to(&string.buffer._M_elems[0], compiled, 42LL)'
    return format_to(out, compiled, std::forward<Args>(args)...);
           ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:334:3: note: in call to 'format_to(&string.buffer._M_elems[0], format, 42LL)'
  fmt::format_to(string.buffer.data(), format, args...);
  ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:366:22: note: in call to 'test_format({{}}, 42LL)'
  EXPECT_EQ("   42", test_format<6>(FMT_COMPILE("{:5}"), 42ll));
                     ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:367:22: error: call to consteval function 'test_format<6, char, unsigned long long, FMT_COMPILE_STRING>' is not a constant expression
  EXPECT_EQ("   42", test_format<6>(FMT_COMPILE("{:5}"), 42ull));
                     ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:1717:14: note: read of element of array without known bound is not allowed in a constant expression
    prefix = data::prefixes[specs.sign];
             ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:2309:19: note: in call to 'write_int(&string.buffer._M_elems[0], 42, specs, {nullptr})'
    return out_ = detail::write_int(out_, value, specs_, locale_);
                  ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/core.h:1360:12: note: in call to '&af(ctx, specs)->operator()(42)'
    return vis(arg.value_.ulong_long_value);
           ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:3528:12: note: in call to 'visit_format_arg(af(ctx, specs), detail::make_arg<fmt::basic_format_context<char *, char>>(val))'
    return visit_format_arg(af(ctx, specs),
           ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:599:16: note: in call to '&compiled.fmt->format(42ULL, ctx)'
    return fmt.format(arg, ctx);
               ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:836:13: note: in call to '&compiled->format(&string.buffer._M_elems[0], 42ULL)'
  return cf.format(out, args...);
            ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:907:12: note: in call to 'format_to(&string.buffer._M_elems[0], compiled, 42ULL)'
    return format_to(out, compiled, std::forward<Args>(args)...);
           ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:334:3: note: in call to 'format_to(&string.buffer._M_elems[0], format, 42ULL)'
  fmt::format_to(string.buffer.data(), format, args...);
  ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:367:22: note: in call to 'test_format({{}}, 42ULL)'
  EXPECT_EQ("   42", test_format<6>(FMT_COMPILE("{:5}"), 42ull));
                     ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:369:21: error: call to consteval function 'test_format<5, char, int, FMT_COMPILE_STRING>' is not a constant expression
  EXPECT_EQ("42  ", test_format<5>(FMT_COMPILE("{:<4}"), 42));
                    ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:1717:14: note: read of element of array without known bound is not allowed in a constant expression
    prefix = data::prefixes[specs.sign];
             ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:2309:19: note: in call to 'write_int(&string.buffer._M_elems[0], 42, specs, {nullptr})'
    return out_ = detail::write_int(out_, value, specs_, locale_);
                  ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/core.h:1354:12: note: in call to '&af(ctx, specs)->operator()(42)'
    return vis(arg.value_.int_value);
           ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:3528:12: note: in call to 'visit_format_arg(af(ctx, specs), detail::make_arg<fmt::basic_format_context<char *, char>>(val))'
    return visit_format_arg(af(ctx, specs),
           ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:599:16: note: in call to '&compiled.fmt->format(42, ctx)'
    return fmt.format(arg, ctx);
               ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:836:13: note: in call to '&compiled->format(&string.buffer._M_elems[0], 42)'
  return cf.format(out, args...);
            ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:907:12: note: in call to 'format_to(&string.buffer._M_elems[0], compiled, 42)'
    return format_to(out, compiled, std::forward<Args>(args)...);
           ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:334:3: note: in call to 'format_to(&string.buffer._M_elems[0], format, 42)'
  fmt::format_to(string.buffer.data(), format, args...);
  ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:369:21: note: in call to 'test_format({{}}, 42)'
  EXPECT_EQ("42  ", test_format<5>(FMT_COMPILE("{:<4}"), 42));
                    ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:370:21: error: call to consteval function 'test_format<5, char, int, FMT_COMPILE_STRING>' is not a constant expression
  EXPECT_EQ("  42", test_format<5>(FMT_COMPILE("{:>4}"), 42));
                    ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:1717:14: note: read of element of array without known bound is not allowed in a constant expression
    prefix = data::prefixes[specs.sign];
             ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:2309:19: note: in call to 'write_int(&string.buffer._M_elems[0], 42, specs, {nullptr})'
    return out_ = detail::write_int(out_, value, specs_, locale_);
                  ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/core.h:1354:12: note: in call to '&af(ctx, specs)->operator()(42)'
    return vis(arg.value_.int_value);
           ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:3528:12: note: in call to 'visit_format_arg(af(ctx, specs), detail::make_arg<fmt::basic_format_context<char *, char>>(val))'
    return visit_format_arg(af(ctx, specs),
           ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:599:16: note: in call to '&compiled.fmt->format(42, ctx)'
    return fmt.format(arg, ctx);
               ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:836:13: note: in call to '&compiled->format(&string.buffer._M_elems[0], 42)'
  return cf.format(out, args...);
            ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:907:12: note: in call to 'format_to(&string.buffer._M_elems[0], compiled, 42)'
    return format_to(out, compiled, std::forward<Args>(args)...);
           ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:334:3: note: in call to 'format_to(&string.buffer._M_elems[0], format, 42)'
  fmt::format_to(string.buffer.data(), format, args...);
  ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:370:21: note: in call to 'test_format({{}}, 42)'
  EXPECT_EQ("  42", test_format<5>(FMT_COMPILE("{:>4}"), 42));
                    ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:371:21: error: call to consteval function 'test_format<5, char, int, FMT_COMPILE_STRING>' is not a constant expression
  EXPECT_EQ(" 42 ", test_format<5>(FMT_COMPILE("{:^4}"), 42));
                    ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:1717:14: note: read of element of array without known bound is not allowed in a constant expression
    prefix = data::prefixes[specs.sign];
             ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:2309:19: note: in call to 'write_int(&string.buffer._M_elems[0], 42, specs, {nullptr})'
    return out_ = detail::write_int(out_, value, specs_, locale_);
                  ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/core.h:1354:12: note: in call to '&af(ctx, specs)->operator()(42)'
    return vis(arg.value_.int_value);
           ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:3528:12: note: in call to 'visit_format_arg(af(ctx, specs), detail::make_arg<fmt::basic_format_context<char *, char>>(val))'
    return visit_format_arg(af(ctx, specs),
           ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:599:16: note: in call to '&compiled.fmt->format(42, ctx)'
    return fmt.format(arg, ctx);
               ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:836:13: note: in call to '&compiled->format(&string.buffer._M_elems[0], 42)'
  return cf.format(out, args...);
            ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:907:12: note: in call to 'format_to(&string.buffer._M_elems[0], compiled, 42)'
    return format_to(out, compiled, std::forward<Args>(args)...);
           ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:334:3: note: in call to 'format_to(&string.buffer._M_elems[0], format, 42)'
  fmt::format_to(string.buffer.data(), format, args...);
  ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:371:21: note: in call to 'test_format({{}}, 42)'
  EXPECT_EQ(" 42 ", test_format<5>(FMT_COMPILE("{:^4}"), 42));
                    ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:379:19: error: call to consteval function 'test_format<3, char, char, FMT_COMPILE_STRING>' is not a constant expression
  EXPECT_EQ("99", test_format<3>(FMT_COMPILE("{:d}"), 'c'));
                  ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:1717:14: note: read of element of array without known bound is not allowed in a constant expression
    prefix = data::prefixes[specs.sign];
             ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:2264:11: note: in call to 'write_int(&string.buffer._M_elems[0], 99, specs, {nullptr})'
          detail::write_int(formatter.out_, static_cast<int>(value),
          ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:1490:55: note: in call to '&fmt::detail::arg_formatter_base<char *, char>::char_spec_handler(*this, static_cast<char>(value))->on_int()'
  if (specs.type && specs.type != 'c') return handler.on_int();
                                                      ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:2313:5: note: in call to 'handle_char_specs(specs, fmt::detail::arg_formatter_base<char *, char>::char_spec_handler(*this, static_cast<char>(value)))'
    handle_char_specs(specs_,
    ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/core.h:1374:12: note: in call to '&af(ctx, specs)->operator()(99)'
    return vis(arg.value_.char_value);
           ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:3528:12: note: in call to 'visit_format_arg(af(ctx, specs), detail::make_arg<fmt::basic_format_context<char *, char>>(val))'
    return visit_format_arg(af(ctx, specs),
           ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:599:16: note: in call to '&compiled.fmt->format('c', ctx)'
    return fmt.format(arg, ctx);
               ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:836:13: note: in call to '&compiled->format(&string.buffer._M_elems[0], 'c')'
  return cf.format(out, args...);
            ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:907:12: note: in call to 'format_to(&string.buffer._M_elems[0], compiled, 'c')'
    return format_to(out, compiled, std::forward<Args>(args)...);
           ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:334:3: note: in call to 'format_to(&string.buffer._M_elems[0], format, 'c')'
  fmt::format_to(string.buffer.data(), format, args...);
  ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:379:19: note: in call to 'test_format({{}}, 'c')'
  EXPECT_EQ("99", test_format<3>(FMT_COMPILE("{:d}"), 'c'));
                  ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:399:23: error: call to consteval function 'test_format<8, char, int, FMT_COMPILE_STRING>' is not a constant expression
  EXPECT_EQ("жж42", test_format<8>(FMT_COMPILE("{:ж>4}"), 42));
                    ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:1717:14: note: read of element of array without known bound is not allowed in a constant expression
    prefix = data::prefixes[specs.sign];
             ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:2309:19: note: in call to 'write_int(&string.buffer._M_elems[0], 42, specs, {nullptr})'
    return out_ = detail::write_int(out_, value, specs_, locale_);
                  ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/core.h:1354:12: note: in call to '&af(ctx, specs)->operator()(42)'
    return vis(arg.value_.int_value);
           ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:3528:12: note: in call to 'visit_format_arg(af(ctx, specs), detail::make_arg<fmt::basic_format_context<char *, char>>(val))'
    return visit_format_arg(af(ctx, specs),
           ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:599:16: note: in call to '&compiled.fmt->format(42, ctx)'
    return fmt.format(arg, ctx);
               ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:836:13: note: in call to '&compiled->format(&string.buffer._M_elems[0], 42)'
  return cf.format(out, args...);
            ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:907:12: note: in call to 'format_to(&string.buffer._M_elems[0], compiled, 42)'
    return format_to(out, compiled, std::forward<Args>(args)...);
           ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:334:3: note: in call to 'format_to(&string.buffer._M_elems[0], format, 42)'
  fmt::format_to(string.buffer.data(), format, args...);
  ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:399:23: note: in call to 'test_format({{}}, 42)'
  EXPECT_EQ("жж42", test_format<8>(FMT_COMPILE("{:ж>4}"), 42));
                    ^
18 errors generated.
[15/51] Building CXX object test/CMakeFiles/ostream-test.dir/ostream-test.cc.obj
ninja: build stopped: subcommand failed.

@denchat
Copy link
Contributor Author

denchat commented Apr 6, 2021

This is output of clang 11.

C:\Users\User\AppData\Roaming\fmt>cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_MAKE_PROGRAM="C:/Program Files (x86)/Ninja/ninja.exe" -DCMAKE_SYSTEM_NAME=Windows -DCMAKE_CXX_STANDARD=20 -DCMAKE_CXX_COMPILER="C:/Program Files/mingw64/bin/clang++.exe" -DCMAKE_CXX_FLAGS="-fuse-ld=lld --target=x86_64-w64-windows-gnu --driver-mode=g++ -O3 -std=gnu++20 -lwinpthread -DNDEBUG -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_STDIO_ISO_WIDE_SPECIFIERS -Wno-unused-command-line-argument" -DCMAKE_CXX_LINK_EXECUTABLE="C:/Program Files/LLVM/bin/lld.exe" -DBUILD_SHARED_LIBS=YES -DFMT_INSTALL=NO -DFMT_DOC=NO -DFMT_TEST=YES "C:/Users/User/AppData/Roaming/fmt-master"
-- CMake version: 3.20.0
-- The CXX compiler identification is Clang 11.0.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files/mingw64/bin/clang++.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Version: 7.1.3
-- Build type: Release
-- CXX_STANDARD: 20
-- Performing Test has_std_20_flag
-- Performing Test has_std_20_flag - Success
-- Performing Test has_std_2a_flag
-- Performing Test has_std_2a_flag - Success
-- Performing Test SUPPORTS_USER_DEFINED_LITERALS
-- Performing Test SUPPORTS_USER_DEFINED_LITERALS - Success
-- Performing Test FMT_HAS_VARIANT
-- Performing Test FMT_HAS_VARIANT - Success
-- Required features: cxx_variadic_templates
-- Performing Test HAS_NULLPTR_WARNING
-- Performing Test HAS_NULLPTR_WARNING - Success
-- Looking for _strtod_l
-- Looking for _strtod_l - found
-- Performing Test FMT_HAS_MBIG_OBJ
-- Performing Test FMT_HAS_MBIG_OBJ - Failed
-- Looking for C++ include pthread.h
-- Looking for C++ include pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Performing Test HAVE_FNO_DELETE_NULL_POINTER_CHECKS
-- Performing Test HAVE_FNO_DELETE_NULL_POINTER_CHECKS - Success
-- FMT_PEDANTIC: OFF
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Users/User/AppData/Roaming/fmt

C:\Users\User\AppData\Roaming\fmt>ninja -j 2
[4/51] Building CXX object CMakeFiles/fmt.dir/src/format.cc.obj
C:/Users/User/AppData/Roaming/fmt-master/src/format.cc:58:17: warning: 'dllexport' attribute ignored on explicit instantiation definition [-Wignored-attributes]
template struct FMT_INSTANTIATION_DEF_API detail::basic_data<void>;
                ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/core.h:227:37: note: expanded from macro 'FMT_INSTANTIATION_DEF_API'
#  define FMT_INSTANTIATION_DEF_API FMT_API
                                    ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/core.h:210:32: note: expanded from macro 'FMT_API'
#    define FMT_API __declspec(dllexport)
                               ^
1 warning generated.
[6/51] Building CXX object CMakeFiles/fmt.dir/src/os.cc.obj
In file included from C:/Users/User/AppData/Roaming/fmt-master/src/os.cc:13:
In file included from C:/Users/User/AppData/Roaming/fmt-master/include\fmt/os.h:21:
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:950:25: warning: instantiation of variable 'fmt::v7::detail::basic_data<void>::powers_of_10_64' required here, but no definition is available [-Wundefined-var-template]
  static const uint64_t powers_of_10_64[];
                        ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:950:25: note: forward declaration of template entity is here
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:950:25: note: add an explicit instantiation declaration to suppress this warning if 'fmt::v7::detail::basic_data<void>::powers_of_10_64' is explicitly instantiated in another translation unit
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:951:25: warning: instantiation of variable 'fmt::v7::detail::basic_data<void>::zero_or_powers_of_10_32_new' required here, but no definition is available [-Wundefined-var-template]
  static const uint32_t zero_or_powers_of_10_32_new[];
                        ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:951:25: note: forward declaration of template entity is here
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:951:25: note: add an explicit instantiation declaration to suppress this warning if 'fmt::v7::detail::basic_data<void>::zero_or_powers_of_10_32_new' is explicitly instantiated in another translation unit
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:952:25: warning: instantiation of variable 'fmt::v7::detail::basic_data<void>::zero_or_powers_of_10_64_new' required here, but no definition is available [-Wundefined-var-template]
  static const uint64_t zero_or_powers_of_10_64_new[];
                        ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:952:25: note: forward declaration of template entity is here
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:952:25: note: add an explicit instantiation declaration to suppress this warning if 'fmt::v7::detail::basic_data<void>::zero_or_powers_of_10_64_new' is explicitly instantiated in another translation unit
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:953:25: warning: instantiation of variable 'fmt::v7::detail::basic_data<void>::grisu_pow10_significands' required here, but no definition is available [-Wundefined-var-template]
  static const uint64_t grisu_pow10_significands[];
                        ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:953:25: note: forward declaration of template entity is here
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:953:25: note: add an explicit instantiation declaration to suppress this warning if 'fmt::v7::detail::basic_data<void>::grisu_pow10_significands' is explicitly instantiated in another translation unit
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:954:24: warning: instantiation of variable 'fmt::v7::detail::basic_data<void>::grisu_pow10_exponents' required here, but no definition is available [-Wundefined-var-template]
  static const int16_t grisu_pow10_exponents[];
                       ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:954:24: note: forward declaration of template entity is here
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:954:24: note: add an explicit instantiation declaration to suppress this warning if 'fmt::v7::detail::basic_data<void>::grisu_pow10_exponents' is explicitly instantiated in another translation unit
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:955:46: warning: instantiation of variable 'fmt::v7::detail::basic_data<void>::divtest_table_for_pow5_32' required here, but no definition is available [-Wundefined-var-template]
  static const divtest_table_entry<uint32_t> divtest_table_for_pow5_32[];
                                             ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:955:46: note: forward declaration of template entity is here
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:955:46: note: add an explicit instantiation declaration to suppress this warning if 'fmt::v7::detail::basic_data<void>::divtest_table_for_pow5_32' is explicitly instantiated in another translation unit
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:956:46: warning: instantiation of variable 'fmt::v7::detail::basic_data<void>::divtest_table_for_pow5_64' required here, but no definition is available [-Wundefined-var-template]
  static const divtest_table_entry<uint64_t> divtest_table_for_pow5_64[];
                                             ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:956:46: note: forward declaration of template entity is here
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:956:46: note: add an explicit instantiation declaration to suppress this warning if 'fmt::v7::detail::basic_data<void>::divtest_table_for_pow5_64' is explicitly instantiated in another translation unit
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:957:25: warning: instantiation of variable 'fmt::v7::detail::basic_data<void>::dragonbox_pow10_significands_64' required here, but no definition is available [-Wundefined-var-template]
  static const uint64_t dragonbox_pow10_significands_64[];
                        ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:957:25: note: forward declaration of template entity is here
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:957:25: note: add an explicit instantiation declaration to suppress this warning if 'fmt::v7::detail::basic_data<void>::dragonbox_pow10_significands_64' is explicitly instantiated in another translation unit
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:958:32: warning: instantiation of variable 'fmt::v7::detail::basic_data<void>::dragonbox_pow10_significands_128' required here, but no definition is available [-Wundefined-var-template]
  static const uint128_wrapper dragonbox_pow10_significands_128[];
                               ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:958:32: note: forward declaration of template entity is here
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:958:32: note: add an explicit instantiation declaration to suppress this warning if 'fmt::v7::detail::basic_data<void>::dragonbox_pow10_significands_128' is explicitly instantiated in another translation unit
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:962:25: warning: instantiation of variable 'fmt::v7::detail::basic_data<void>::powers_of_5_64' required here, but no definition is available [-Wundefined-var-template]
  static const uint64_t powers_of_5_64[];
                        ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:962:25: note: forward declaration of template entity is here
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:962:25: note: add an explicit instantiation declaration to suppress this warning if 'fmt::v7::detail::basic_data<void>::powers_of_5_64' is explicitly instantiated in another translation unit
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:963:25: warning: instantiation of variable 'fmt::v7::detail::basic_data<void>::dragonbox_pow10_recovery_errors' required here, but no definition is available [-Wundefined-var-template]
  static const uint32_t dragonbox_pow10_recovery_errors[];
                        ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:963:25: note: forward declaration of template entity is here
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:963:25: note: add an explicit instantiation declaration to suppress this warning if 'fmt::v7::detail::basic_data<void>::dragonbox_pow10_recovery_errors' is explicitly instantiated in another translation unit
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:967:27: warning: instantiation of variable 'fmt::v7::detail::basic_data<void>::digits' required here, but no definition is available [-Wundefined-var-template]
  static const digit_pair digits[];
                          ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:967:27: note: forward declaration of template entity is here
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:967:27: note: add an explicit instantiation declaration to suppress this warning if 'fmt::v7::detail::basic_data<void>::digits' is explicitly instantiated in another translation unit
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:969:21: warning: instantiation of variable 'fmt::v7::detail::basic_data<void>::foreground_color' required here, but no definition is available [-Wundefined-var-template]
  static const char foreground_color[];
                    ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:969:21: note: forward declaration of template entity is here
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:969:21: note: add an explicit instantiation declaration to suppress this warning if 'fmt::v7::detail::basic_data<void>::foreground_color' is explicitly instantiated in another translation unit
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:970:21: warning: instantiation of variable 'fmt::v7::detail::basic_data<void>::background_color' required here, but no definition is available [-Wundefined-var-template]
  static const char background_color[];
                    ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:970:21: note: forward declaration of template entity is here
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:970:21: note: add an explicit instantiation declaration to suppress this warning if 'fmt::v7::detail::basic_data<void>::background_color' is explicitly instantiated in another translation unit
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:971:21: warning: instantiation of variable 'fmt::v7::detail::basic_data<void>::reset_color' required here, but no definition is available [-Wundefined-var-template]
  static const char reset_color[5];
                    ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:971:21: note: forward declaration of template entity is here
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:971:21: note: add an explicit instantiation declaration to suppress this warning if 'fmt::v7::detail::basic_data<void>::reset_color' is explicitly instantiated in another translation unit
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:972:24: warning: instantiation of variable 'fmt::v7::detail::basic_data<void>::wreset_color' required here, but no definition is available [-Wundefined-var-template]
  static const wchar_t wreset_color[5];
                       ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:972:24: note: forward declaration of template entity is here
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:972:24: note: add an explicit instantiation declaration to suppress this warning if 'fmt::v7::detail::basic_data<void>::wreset_color' is explicitly instantiated in another translation unit
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:973:21: warning: instantiation of variable 'fmt::v7::detail::basic_data<void>::signs' required here, but no definition is available [-Wundefined-var-template]
  static const char signs[];
                    ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:973:21: note: forward declaration of template entity is here
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:973:21: note: add an explicit instantiation declaration to suppress this warning if 'fmt::v7::detail::basic_data<void>::signs' is explicitly instantiated in another translation unit
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:980:25: warning: instantiation of variable 'fmt::v7::detail::basic_data<void>::zero_or_powers_of_10_32' required here, but no definition is available [-Wundefined-var-template]
  static const uint32_t zero_or_powers_of_10_32[];
                        ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:980:25: note: forward declaration of template entity is here
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:980:25: note: add an explicit instantiation declaration to suppress this warning if 'fmt::v7::detail::basic_data<void>::zero_or_powers_of_10_32' is explicitly instantiated in another translation unit
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:981:25: warning: instantiation of variable 'fmt::v7::detail::basic_data<void>::zero_or_powers_of_10_64' required here, but no definition is available [-Wundefined-var-template]
  static const uint64_t zero_or_powers_of_10_64[];
                        ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:981:25: note: forward declaration of template entity is here
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:981:25: note: add an explicit instantiation declaration to suppress this warning if 'fmt::v7::detail::basic_data<void>::zero_or_powers_of_10_64' is explicitly instantiated in another translation unit
19 warnings generated.
[12/51] Linking CXX executable bin\args-test.exe
FAILED: bin/args-test.exe
cmd.exe /C "cd . && C:\PROGRA~1\mingw64\bin\CLANG_~1.EXE -fuse-ld=lld --target=x86_64-w64-windows-gnu --driver-mode=g++ -O3 -std=gnu++20 -lwinpthread -DNDEBUG -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_STDIO_ISO_WIDE_SPECIFIERS -Wno-unused-command-line-argument -O3 -DNDEBUG  test/CMakeFiles/args-test.dir/args-test.cc.obj -o bin\args-test.exe -Wl,--out-implib,test\libargs-test.dll.a -Wl,--major-image-version,0,--minor-image-version,0  -static-libgcc  -static-libstdc++  test/libtest-main.a  test/libgmock.a  libfmt.dll.a  -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 && cd ."
lld-link: error: duplicate symbol: typeinfo name for std::exception
>>> defined at libgmock.a(gmock-gtest-all.cc.obj)
>>> defined at libstdc++.a(eh_alloc.o)

lld-link: error: duplicate symbol: typeinfo name for std::exception
>>> defined at libgmock.a(gmock-gtest-all.cc.obj)
>>> defined at libstdc++.a(eh_personality.o)

lld-link: error: duplicate symbol: typeinfo name for std::exception
>>> defined at libgmock.a(gmock-gtest-all.cc.obj)
>>> defined at libstdc++.a(new_op.o)

lld-link: error: duplicate symbol: typeinfo name for std::exception
>>> defined at libgmock.a(gmock-gtest-all.cc.obj)
>>> defined at libstdc++.a(locale.o)

lld-link: error: duplicate symbol: typeinfo for std::runtime_error
>>> defined at libgmock.a(gmock-gtest-all.cc.obj)
>>> defined at libstdc++.a(functexcept.o)

lld-link: error: duplicate symbol: typeinfo name for std::exception
>>> defined at libgmock.a(gmock-gtest-all.cc.obj)
>>> defined at libstdc++.a(functexcept.o)

lld-link: error: duplicate symbol: typeinfo name for std::runtime_error
>>> defined at libgmock.a(gmock-gtest-all.cc.obj)
>>> defined at libstdc++.a(functexcept.o)

lld-link: error: duplicate symbol: typeinfo name for std::exception
>>> defined at libgmock.a(gmock-gtest-all.cc.obj)
>>> defined at libstdc++.a(guard.o)

lld-link: error: duplicate symbol: typeinfo name for std::exception
>>> defined at libgmock.a(gmock-gtest-all.cc.obj)
>>> defined at libstdc++.a(stdexcept.o)

lld-link: error: duplicate symbol: typeinfo name for std::runtime_error
>>> defined at libgmock.a(gmock-gtest-all.cc.obj)
>>> defined at libstdc++.a(stdexcept.o)

lld-link: error: duplicate symbol: typeinfo for std::runtime_error
>>> defined at libgmock.a(gmock-gtest-all.cc.obj)
>>> defined at libstdc++.a(stdexcept.o)

lld-link: error: duplicate symbol: typeinfo name for std::exception
>>> defined at libgmock.a(gmock-gtest-all.cc.obj)
>>> defined at libstdc++.a(eh_exception.o)

lld-link: error: duplicate symbol: typeinfo name for std::exception
>>> defined at libgmock.a(gmock-gtest-all.cc.obj)
>>> defined at libstdc++.a(vterminate.o)

lld-link: error: duplicate symbol: typeinfo name for std::exception
>>> defined at libgmock.a(gmock-gtest-all.cc.obj)
>>> defined at libstdc++.a(bad_alloc.o)

lld-link: error: duplicate symbol: typeinfo name for std::exception
>>> defined at libgmock.a(gmock-gtest-all.cc.obj)
>>> defined at libstdc++.a(locale_init.o)

lld-link: error: duplicate symbol: typeinfo name for std::exception
>>> defined at libgmock.a(gmock-gtest-all.cc.obj)
>>> defined at libstdc++.a(bad_cast.o)

lld-link: error: duplicate symbol: typeinfo name for std::exception
>>> defined at libgmock.a(gmock-gtest-all.cc.obj)
>>> defined at libstdc++.a(bad_typeid.o)

lld-link: error: duplicate symbol: typeinfo name for std::exception
>>> defined at libgmock.a(gmock-gtest-all.cc.obj)
>>> defined at libstdc++.a(cxx11-ios_failure.o)

lld-link: error: duplicate symbol: typeinfo name for std::runtime_error
>>> defined at libgmock.a(gmock-gtest-all.cc.obj)
>>> defined at libstdc++.a(cxx11-ios_failure.o)

lld-link: error: duplicate symbol: typeinfo for std::runtime_error
>>> defined at libgmock.a(gmock-gtest-all.cc.obj)
>>> defined at libstdc++.a(cxx11-ios_failure.o)

lld-link: error: too many errors emitted, stopping now (use /errorlimit:0 to see all errors)
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
[13/51] Building CXX object test/CMakeFiles/compile-test.dir/compile-test.cc.obj
FAILED: test/CMakeFiles/compile-test.dir/compile-test.cc.obj
C:\PROGRA~1\mingw64\bin\CLANG_~1.EXE -DFMT_LOCALE -DFMT_SHARED -DGTEST_HAS_STD_WSTRING=1 -DGTEST_LANG_CXX11=1 -D_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING=1 -IC:/Users/User/AppData/Roaming/fmt-master/include -isystem C:/Users/User/AppData/Roaming/fmt-master/test/gtest -isystem C:/Users/User/AppData/Roaming/fmt-master/test/gmock -isystem C:/Users/User/AppData/Roaming/fmt-master/test/. -fuse-ld=lld --target=x86_64-w64-windows-gnu --driver-mode=g++ -O3 -std=gnu++20 -lwinpthread -DNDEBUG -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_STDIO_ISO_WIDE_SPECIFIERS -Wno-unused-command-line-argument -O3 -DNDEBUG -fno-delete-null-pointer-checks -std=gnu++20 -MD -MT test/CMakeFiles/compile-test.dir/compile-test.cc.obj -MF test\CMakeFiles\compile-test.dir\compile-test.cc.obj.d -o test/CMakeFiles/compile-test.dir/compile-test.cc.obj -c C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:341:22: error: call to consteval function 'test_format<6, char, bool, FMT_COMPILE_STRING>' is not a constant expression
  EXPECT_EQ("true ", test_format<6>(FMT_COMPILE("{:5}"), true));
                     ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:1563:36: note: initializer of 'left_padding_shifts' is unknown
  size_t left_padding = padding >> shifts[specs.align];
                                   ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:1787:10: note: in call to 'write_padded(&string.buffer._M_elems[0], specs, 4, 4, [=](reserve_iterator<char *> it) {
    return copy_str<char>(data, data + size, it);
})'
  return write_padded(out, specs, size, width,
         ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:2247:12: note: in call to 'write(&string.buffer._M_elems[0], {&"true"[0], 4}, specs)'
    out_ = detail::write(out_, s, specs);
           ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:2288:5: note: in call to '&af(ctx, specs)->write({&"true"[0], 4}, specs)'
    write(string_view(value ? "true" : "false"), specs_);
    ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:2320:5: note: in call to '&af(ctx, specs)->write(true)'
    write(value != 0);
    ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/core.h:1372:12: note: in call to '&af(ctx, specs)->operator()(true)'
    return vis(arg.value_.bool_value);
           ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:3528:12: note: (skipping 1 call in backtrace; use -fconstexpr-backtrace-limit=0 to see all)
    return visit_format_arg(af(ctx, specs),
           ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:599:16: note: in call to '&compiled.fmt->format(true, ctx)'
    return fmt.format(arg, ctx);
               ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:836:13: note: in call to '&compiled->format(&string.buffer._M_elems[0], true)'
  return cf.format(out, args...);
            ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:907:12: note: in call to 'format_to(&string.buffer._M_elems[0], compiled, true)'
    return format_to(out, compiled, std::forward<Args>(args)...);
           ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:334:3: note: in call to 'format_to(&string.buffer._M_elems[0], format, true)'
  fmt::format_to(string.buffer.data(), format, args...);
  ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:341:22: note: in call to 'test_format({{}}, true)'
  EXPECT_EQ("true ", test_format<6>(FMT_COMPILE("{:5}"), true));
                     ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:976:31: note: declared here
  static constexpr const char left_padding_shifts[] = {31, 31, 0, 1, 0};
                              ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:342:18: error: call to consteval function 'test_format<2, char, bool, FMT_COMPILE_STRING>' is not a constant expression
  EXPECT_EQ("1", test_format<2>(FMT_COMPILE("{:d}"), true));
                 ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:1717:14: note: initializer of 'prefixes' is unknown
    prefix = data::prefixes[specs.sign];
             ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:2309:19: note: in call to 'write_int(&string.buffer._M_elems[0], 1, specs, {nullptr})'
    return out_ = detail::write_int(out_, value, specs_, locale_);
                  ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:2319:51: note: in call to '&af(ctx, specs)->operator()(1)'
    if (specs_.type && specs_.type != 's') return (*this)(value ? 1 : 0);
                                                  ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/core.h:1372:12: note: in call to '&af(ctx, specs)->operator()(true)'
    return vis(arg.value_.bool_value);
           ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:3528:12: note: in call to 'visit_format_arg(af(ctx, specs), detail::make_arg<fmt::v7::basic_format_context<char *, char>>(val))'
    return visit_format_arg(af(ctx, specs),
           ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:599:16: note: in call to '&compiled.fmt->format(true, ctx)'
    return fmt.format(arg, ctx);
               ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:836:13: note: in call to '&compiled->format(&string.buffer._M_elems[0], true)'
  return cf.format(out, args...);
            ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:907:12: note: in call to 'format_to(&string.buffer._M_elems[0], compiled, true)'
    return format_to(out, compiled, std::forward<Args>(args)...);
           ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:334:3: note: in call to 'format_to(&string.buffer._M_elems[0], format, true)'
  fmt::format_to(string.buffer.data(), format, args...);
  ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:342:18: note: in call to 'test_format({{}}, true)'
  EXPECT_EQ("1", test_format<2>(FMT_COMPILE("{:d}"), true));
                 ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:974:35: note: declared here
  static constexpr const unsigned prefixes[] = {0, 0, 0x1000000u | '+',
                                  ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:352:20: error: call to consteval function 'test_format<4, char, int, FMT_COMPILE_STRING>' is not a constant expression
  EXPECT_EQ("+42", test_format<4>(FMT_COMPILE("{:+}"), 42));
                   ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:1717:14: note: indexing of array without known bound is not allowed in a constant expression
    prefix = data::prefixes[specs.sign];
             ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:2309:19: note: in call to 'write_int(&string.buffer._M_elems[0], 42, specs, {nullptr})'
    return out_ = detail::write_int(out_, value, specs_, locale_);
                  ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/core.h:1354:12: note: in call to '&af(ctx, specs)->operator()(42)'
    return vis(arg.value_.int_value);
           ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:3528:12: note: in call to 'visit_format_arg(af(ctx, specs), detail::make_arg<fmt::v7::basic_format_context<char *, char>>(val))'
    return visit_format_arg(af(ctx, specs),
           ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:599:16: note: in call to '&compiled.fmt->format(42, ctx)'
    return fmt.format(arg, ctx);
               ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:836:13: note: in call to '&compiled->format(&string.buffer._M_elems[0], 42)'
  return cf.format(out, args...);
            ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:907:12: note: in call to 'format_to(&string.buffer._M_elems[0], compiled, 42)'
    return format_to(out, compiled, std::forward<Args>(args)...);
           ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:334:3: note: in call to 'format_to(&string.buffer._M_elems[0], format, 42)'
  fmt::format_to(string.buffer.data(), format, args...);
  ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:352:20: note: in call to 'test_format({{}}, 42)'
  EXPECT_EQ("+42", test_format<4>(FMT_COMPILE("{:+}"), 42));
                   ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:353:19: error: call to consteval function 'test_format<3, char, int, FMT_COMPILE_STRING>' is not a constant expression
  EXPECT_EQ("42", test_format<3>(FMT_COMPILE("{:-}"), 42));
                  ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:1717:14: note: indexing of array without known bound is not allowed in a constant expression
    prefix = data::prefixes[specs.sign];
             ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:2309:19: note: in call to 'write_int(&string.buffer._M_elems[0], 42, specs, {nullptr})'
    return out_ = detail::write_int(out_, value, specs_, locale_);
                  ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/core.h:1354:12: note: in call to '&af(ctx, specs)->operator()(42)'
    return vis(arg.value_.int_value);
           ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:3528:12: note: in call to 'visit_format_arg(af(ctx, specs), detail::make_arg<fmt::v7::basic_format_context<char *, char>>(val))'
    return visit_format_arg(af(ctx, specs),
           ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:599:16: note: in call to '&compiled.fmt->format(42, ctx)'
    return fmt.format(arg, ctx);
               ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:836:13: note: in call to '&compiled->format(&string.buffer._M_elems[0], 42)'
  return cf.format(out, args...);
            ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:907:12: note: in call to 'format_to(&string.buffer._M_elems[0], compiled, 42)'
    return format_to(out, compiled, std::forward<Args>(args)...);
           ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:334:3: note: in call to 'format_to(&string.buffer._M_elems[0], format, 42)'
  fmt::format_to(string.buffer.data(), format, args...);
  ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:353:19: note: in call to 'test_format({{}}, 42)'
  EXPECT_EQ("42", test_format<3>(FMT_COMPILE("{:-}"), 42));
                  ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:354:20: error: call to consteval function 'test_format<4, char, int, FMT_COMPILE_STRING>' is not a constant expression
  EXPECT_EQ(" 42", test_format<4>(FMT_COMPILE("{: }"), 42));
                   ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:1717:14: note: indexing of array without known bound is not allowed in a constant expression
    prefix = data::prefixes[specs.sign];
             ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:2309:19: note: in call to 'write_int(&string.buffer._M_elems[0], 42, specs, {nullptr})'
    return out_ = detail::write_int(out_, value, specs_, locale_);
                  ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/core.h:1354:12: note: in call to '&af(ctx, specs)->operator()(42)'
    return vis(arg.value_.int_value);
           ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:3528:12: note: in call to 'visit_format_arg(af(ctx, specs), detail::make_arg<fmt::v7::basic_format_context<char *, char>>(val))'
    return visit_format_arg(af(ctx, specs),
           ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:599:16: note: in call to '&compiled.fmt->format(42, ctx)'
    return fmt.format(arg, ctx);
               ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:836:13: note: in call to '&compiled->format(&string.buffer._M_elems[0], 42)'
  return cf.format(out, args...);
            ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:907:12: note: in call to 'format_to(&string.buffer._M_elems[0], compiled, 42)'
    return format_to(out, compiled, std::forward<Args>(args)...);
           ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:334:3: note: in call to 'format_to(&string.buffer._M_elems[0], format, 42)'
  fmt::format_to(string.buffer.data(), format, args...);
  ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:354:20: note: in call to 'test_format({{}}, 42)'
  EXPECT_EQ(" 42", test_format<4>(FMT_COMPILE("{: }"), 42));
                   ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:356:22: error: call to consteval function 'test_format<6, char, int, FMT_COMPILE_STRING>' is not a constant expression
  EXPECT_EQ("-0042", test_format<6>(FMT_COMPILE("{:05}"), -42));
                     ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:1563:36: note: indexing of array without known bound is not allowed in a constant expression
  size_t left_padding = padding >> shifts[specs.align];
                                   ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:1577:10: note: in call to 'write_padded(&string.buffer._M_elems[0], specs, 5, 5, [=](reserve_iterator<char *> it) {
    for (unsigned int p = prefix & 16777215; p != 0; p >>= 8)
        *it++ = static_cast<char>(p & 255);
    it = detail::fill_n(it, data.padding, static_cast<char>('0'));
    return write_digits(it);
})'
  return write_padded<align>(out, specs, size, size, f);
         ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:1639:10: note: in call to 'write_padded(&string.buffer._M_elems[0], specs, 5, [=](reserve_iterator<char *> it) {
    for (unsigned int p = prefix & 16777215; p != 0; p >>= 8)
        *it++ = static_cast<char>(p & 255);
    it = detail::fill_n(it, data.padding, static_cast<char>('0'));
    return write_digits(it);
})'
  return write_padded<align::right>(
         ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:1729:12: note: in call to 'write_int(&string.buffer._M_elems[0], 2, 16777261, specs, {42, 2})'
    return write_int(
           ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:2309:19: note: in call to 'write_int(&string.buffer._M_elems[0], -42, specs, {nullptr})'
    return out_ = detail::write_int(out_, value, specs_, locale_);
                  ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/core.h:1354:12: note: in call to '&af(ctx, specs)->operator()(-42)'
    return vis(arg.value_.int_value);
           ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:3528:12: note: (skipping 1 call in backtrace; use -fconstexpr-backtrace-limit=0 to see all)
    return visit_format_arg(af(ctx, specs),
           ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:599:16: note: in call to '&compiled.fmt->format(-42, ctx)'
    return fmt.format(arg, ctx);
               ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:836:13: note: in call to '&compiled->format(&string.buffer._M_elems[0], -42)'
  return cf.format(out, args...);
            ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:907:12: note: in call to 'format_to(&string.buffer._M_elems[0], compiled, -42)'
    return format_to(out, compiled, std::forward<Args>(args)...);
           ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:334:3: note: in call to 'format_to(&string.buffer._M_elems[0], format, -42)'
  fmt::format_to(string.buffer.data(), format, args...);
  ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:356:22: note: in call to 'test_format({{}}, -42)'
  EXPECT_EQ("-0042", test_format<6>(FMT_COMPILE("{:05}"), -42));
                     ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:358:23: error: call to consteval function 'test_format<7, char, int, FMT_COMPILE_STRING>' is not a constant expression
  EXPECT_EQ("101010", test_format<7>(FMT_COMPILE("{:b}"), 42));
                      ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:1717:14: note: initializer of 'prefixes' is unknown
    prefix = data::prefixes[specs.sign];
             ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:2309:19: note: in call to 'write_int(&string.buffer._M_elems[0], 42, specs, {nullptr})'
    return out_ = detail::write_int(out_, value, specs_, locale_);
                  ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/core.h:1354:12: note: in call to '&af(ctx, specs)->operator()(42)'
    return vis(arg.value_.int_value);
           ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:3528:12: note: in call to 'visit_format_arg(af(ctx, specs), detail::make_arg<fmt::v7::basic_format_context<char *, char>>(val))'
    return visit_format_arg(af(ctx, specs),
           ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:599:16: note: in call to '&compiled.fmt->format(42, ctx)'
    return fmt.format(arg, ctx);
               ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:836:13: note: in call to '&compiled->format(&string.buffer._M_elems[0], 42)'
  return cf.format(out, args...);
            ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:907:12: note: in call to 'format_to(&string.buffer._M_elems[0], compiled, 42)'
    return format_to(out, compiled, std::forward<Args>(args)...);
           ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:334:3: note: in call to 'format_to(&string.buffer._M_elems[0], format, 42)'
  fmt::format_to(string.buffer.data(), format, args...);
  ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:358:23: note: in call to 'test_format({{}}, 42)'
  EXPECT_EQ("101010", test_format<7>(FMT_COMPILE("{:b}"), 42));
                      ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:974:35: note: declared here
  static constexpr const unsigned prefixes[] = {0, 0, 0x1000000u | '+',
                                  ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:359:25: error: call to consteval function 'test_format<9, char, int, FMT_COMPILE_STRING>' is not a constant expression
  EXPECT_EQ("0b101010", test_format<9>(FMT_COMPILE("{:#b}"), 42));
                        ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:1717:14: note: initializer of 'prefixes' is unknown
    prefix = data::prefixes[specs.sign];
             ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:2309:19: note: in call to 'write_int(&string.buffer._M_elems[0], 42, specs, {nullptr})'
    return out_ = detail::write_int(out_, value, specs_, locale_);
                  ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/core.h:1354:12: note: in call to '&af(ctx, specs)->operator()(42)'
    return vis(arg.value_.int_value);
           ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:3528:12: note: in call to 'visit_format_arg(af(ctx, specs), detail::make_arg<fmt::v7::basic_format_context<char *, char>>(val))'
    return visit_format_arg(af(ctx, specs),
           ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:599:16: note: in call to '&compiled.fmt->format(42, ctx)'
    return fmt.format(arg, ctx);
               ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:836:13: note: in call to '&compiled->format(&string.buffer._M_elems[0], 42)'
  return cf.format(out, args...);
            ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:907:12: note: in call to 'format_to(&string.buffer._M_elems[0], compiled, 42)'
    return format_to(out, compiled, std::forward<Args>(args)...);
           ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:334:3: note: in call to 'format_to(&string.buffer._M_elems[0], format, 42)'
  fmt::format_to(string.buffer.data(), format, args...);
  ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:359:25: note: in call to 'test_format({{}}, 42)'
  EXPECT_EQ("0b101010", test_format<9>(FMT_COMPILE("{:#b}"), 42));
                        ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:974:35: note: declared here
  static constexpr const unsigned prefixes[] = {0, 0, 0x1000000u | '+',
                                  ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:360:25: error: call to consteval function 'test_format<9, char, int, FMT_COMPILE_STRING>' is not a constant expression
  EXPECT_EQ("0B101010", test_format<9>(FMT_COMPILE("{:#B}"), 42));
                        ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:1717:14: note: initializer of 'prefixes' is unknown
    prefix = data::prefixes[specs.sign];
             ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:2309:19: note: in call to 'write_int(&string.buffer._M_elems[0], 42, specs, {nullptr})'
    return out_ = detail::write_int(out_, value, specs_, locale_);
                  ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/core.h:1354:12: note: in call to '&af(ctx, specs)->operator()(42)'
    return vis(arg.value_.int_value);
           ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:3528:12: note: in call to 'visit_format_arg(af(ctx, specs), detail::make_arg<fmt::v7::basic_format_context<char *, char>>(val))'
    return visit_format_arg(af(ctx, specs),
           ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:599:16: note: in call to '&compiled.fmt->format(42, ctx)'
    return fmt.format(arg, ctx);
               ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:836:13: note: in call to '&compiled->format(&string.buffer._M_elems[0], 42)'
  return cf.format(out, args...);
            ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:907:12: note: in call to 'format_to(&string.buffer._M_elems[0], compiled, 42)'
    return format_to(out, compiled, std::forward<Args>(args)...);
           ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:334:3: note: in call to 'format_to(&string.buffer._M_elems[0], format, 42)'
  fmt::format_to(string.buffer.data(), format, args...);
  ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:360:25: note: in call to 'test_format({{}}, 42)'
  EXPECT_EQ("0B101010", test_format<9>(FMT_COMPILE("{:#B}"), 42));
                        ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:974:35: note: declared here
  static constexpr const unsigned prefixes[] = {0, 0, 0x1000000u | '+',
                                  ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:361:20: error: call to consteval function 'test_format<4, char, int, FMT_COMPILE_STRING>' is not a constant expression
  EXPECT_EQ("042", test_format<4>(FMT_COMPILE("{:#o}"), 042));
                   ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:1717:14: note: initializer of 'prefixes' is unknown
    prefix = data::prefixes[specs.sign];
             ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:2309:19: note: in call to 'write_int(&string.buffer._M_elems[0], 34, specs, {nullptr})'
    return out_ = detail::write_int(out_, value, specs_, locale_);
                  ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/core.h:1354:12: note: in call to '&af(ctx, specs)->operator()(34)'
    return vis(arg.value_.int_value);
           ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:3528:12: note: in call to 'visit_format_arg(af(ctx, specs), detail::make_arg<fmt::v7::basic_format_context<char *, char>>(val))'
    return visit_format_arg(af(ctx, specs),
           ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:599:16: note: in call to '&compiled.fmt->format(34, ctx)'
    return fmt.format(arg, ctx);
               ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:836:13: note: in call to '&compiled->format(&string.buffer._M_elems[0], 34)'
  return cf.format(out, args...);
            ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:907:12: note: in call to 'format_to(&string.buffer._M_elems[0], compiled, 34)'
    return format_to(out, compiled, std::forward<Args>(args)...);
           ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:334:3: note: in call to 'format_to(&string.buffer._M_elems[0], format, 34)'
  fmt::format_to(string.buffer.data(), format, args...);
  ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:361:20: note: in call to 'test_format({{}}, 34)'
  EXPECT_EQ("042", test_format<4>(FMT_COMPILE("{:#o}"), 042));
                   ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:974:35: note: declared here
  static constexpr const unsigned prefixes[] = {0, 0, 0x1000000u | '+',
                                  ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:362:21: error: call to consteval function 'test_format<5, char, int, FMT_COMPILE_STRING>' is not a constant expression
  EXPECT_EQ("0x4a", test_format<5>(FMT_COMPILE("{:#x}"), 0x4a));
                    ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:1717:14: note: initializer of 'prefixes' is unknown
    prefix = data::prefixes[specs.sign];
             ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:2309:19: note: in call to 'write_int(&string.buffer._M_elems[0], 74, specs, {nullptr})'
    return out_ = detail::write_int(out_, value, specs_, locale_);
                  ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/core.h:1354:12: note: in call to '&af(ctx, specs)->operator()(74)'
    return vis(arg.value_.int_value);
           ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:3528:12: note: in call to 'visit_format_arg(af(ctx, specs), detail::make_arg<fmt::v7::basic_format_context<char *, char>>(val))'
    return visit_format_arg(af(ctx, specs),
           ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:599:16: note: in call to '&compiled.fmt->format(74, ctx)'
    return fmt.format(arg, ctx);
               ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:836:13: note: in call to '&compiled->format(&string.buffer._M_elems[0], 74)'
  return cf.format(out, args...);
            ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:907:12: note: in call to 'format_to(&string.buffer._M_elems[0], compiled, 74)'
    return format_to(out, compiled, std::forward<Args>(args)...);
           ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:334:3: note: in call to 'format_to(&string.buffer._M_elems[0], format, 74)'
  fmt::format_to(string.buffer.data(), format, args...);
  ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:362:21: note: in call to 'test_format({{}}, 74)'
  EXPECT_EQ("0x4a", test_format<5>(FMT_COMPILE("{:#x}"), 0x4a));
                    ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:974:35: note: declared here
  static constexpr const unsigned prefixes[] = {0, 0, 0x1000000u | '+',
                                  ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:363:21: error: call to consteval function 'test_format<5, char, int, FMT_COMPILE_STRING>' is not a constant expression
  EXPECT_EQ("0X4A", test_format<5>(FMT_COMPILE("{:#X}"), 0x4a));
                    ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:1717:14: note: initializer of 'prefixes' is unknown
    prefix = data::prefixes[specs.sign];
             ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:2309:19: note: in call to 'write_int(&string.buffer._M_elems[0], 74, specs, {nullptr})'
    return out_ = detail::write_int(out_, value, specs_, locale_);
                  ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/core.h:1354:12: note: in call to '&af(ctx, specs)->operator()(74)'
    return vis(arg.value_.int_value);
           ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:3528:12: note: in call to 'visit_format_arg(af(ctx, specs), detail::make_arg<fmt::v7::basic_format_context<char *, char>>(val))'
    return visit_format_arg(af(ctx, specs),
           ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:599:16: note: in call to '&compiled.fmt->format(74, ctx)'
    return fmt.format(arg, ctx);
               ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:836:13: note: in call to '&compiled->format(&string.buffer._M_elems[0], 74)'
  return cf.format(out, args...);
            ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:907:12: note: in call to 'format_to(&string.buffer._M_elems[0], compiled, 74)'
    return format_to(out, compiled, std::forward<Args>(args)...);
           ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:334:3: note: in call to 'format_to(&string.buffer._M_elems[0], format, 74)'
  fmt::format_to(string.buffer.data(), format, args...);
  ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:363:21: note: in call to 'test_format({{}}, 74)'
  EXPECT_EQ("0X4A", test_format<5>(FMT_COMPILE("{:#X}"), 0x4a));
                    ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:974:35: note: declared here
  static constexpr const unsigned prefixes[] = {0, 0, 0x1000000u | '+',
                                  ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:365:22: error: call to consteval function 'test_format<6, char, int, FMT_COMPILE_STRING>' is not a constant expression
  EXPECT_EQ("   42", test_format<6>(FMT_COMPILE("{:5}"), 42));
                     ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:1717:14: note: initializer of 'prefixes' is unknown
    prefix = data::prefixes[specs.sign];
             ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:2309:19: note: in call to 'write_int(&string.buffer._M_elems[0], 42, specs, {nullptr})'
    return out_ = detail::write_int(out_, value, specs_, locale_);
                  ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/core.h:1354:12: note: in call to '&af(ctx, specs)->operator()(42)'
    return vis(arg.value_.int_value);
           ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:3528:12: note: in call to 'visit_format_arg(af(ctx, specs), detail::make_arg<fmt::v7::basic_format_context<char *, char>>(val))'
    return visit_format_arg(af(ctx, specs),
           ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:599:16: note: in call to '&compiled.fmt->format(42, ctx)'
    return fmt.format(arg, ctx);
               ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:836:13: note: in call to '&compiled->format(&string.buffer._M_elems[0], 42)'
  return cf.format(out, args...);
            ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:907:12: note: in call to 'format_to(&string.buffer._M_elems[0], compiled, 42)'
    return format_to(out, compiled, std::forward<Args>(args)...);
           ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:334:3: note: in call to 'format_to(&string.buffer._M_elems[0], format, 42)'
  fmt::format_to(string.buffer.data(), format, args...);
  ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:365:22: note: in call to 'test_format({{}}, 42)'
  EXPECT_EQ("   42", test_format<6>(FMT_COMPILE("{:5}"), 42));
                     ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:974:35: note: declared here
  static constexpr const unsigned prefixes[] = {0, 0, 0x1000000u | '+',
                                  ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:366:22: error: call to consteval function 'test_format<6, char, long long, FMT_COMPILE_STRING>' is not a constant expression
  EXPECT_EQ("   42", test_format<6>(FMT_COMPILE("{:5}"), 42ll));
                     ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:1717:14: note: initializer of 'prefixes' is unknown
    prefix = data::prefixes[specs.sign];
             ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:2309:19: note: in call to 'write_int(&string.buffer._M_elems[0], 42, specs, {nullptr})'
    return out_ = detail::write_int(out_, value, specs_, locale_);
                  ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/core.h:1358:12: note: in call to '&af(ctx, specs)->operator()(42)'
    return vis(arg.value_.long_long_value);
           ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:3528:12: note: in call to 'visit_format_arg(af(ctx, specs), detail::make_arg<fmt::v7::basic_format_context<char *, char>>(val))'
    return visit_format_arg(af(ctx, specs),
           ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:599:16: note: in call to '&compiled.fmt->format(42LL, ctx)'
    return fmt.format(arg, ctx);
               ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:836:13: note: in call to '&compiled->format(&string.buffer._M_elems[0], 42LL)'
  return cf.format(out, args...);
            ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:907:12: note: in call to 'format_to(&string.buffer._M_elems[0], compiled, 42LL)'
    return format_to(out, compiled, std::forward<Args>(args)...);
           ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:334:3: note: in call to 'format_to(&string.buffer._M_elems[0], format, 42LL)'
  fmt::format_to(string.buffer.data(), format, args...);
  ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:366:22: note: in call to 'test_format({{}}, 42LL)'
  EXPECT_EQ("   42", test_format<6>(FMT_COMPILE("{:5}"), 42ll));
                     ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:974:35: note: declared here
  static constexpr const unsigned prefixes[] = {0, 0, 0x1000000u | '+',
                                  ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:367:22: error: call to consteval function 'test_format<6, char, unsigned long long, FMT_COMPILE_STRING>' is not a constant expression
  EXPECT_EQ("   42", test_format<6>(FMT_COMPILE("{:5}"), 42ull));
                     ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:1717:14: note: initializer of 'prefixes' is unknown
    prefix = data::prefixes[specs.sign];
             ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:2309:19: note: in call to 'write_int(&string.buffer._M_elems[0], 42, specs, {nullptr})'
    return out_ = detail::write_int(out_, value, specs_, locale_);
                  ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/core.h:1360:12: note: in call to '&af(ctx, specs)->operator()(42)'
    return vis(arg.value_.ulong_long_value);
           ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:3528:12: note: in call to 'visit_format_arg(af(ctx, specs), detail::make_arg<fmt::v7::basic_format_context<char *, char>>(val))'
    return visit_format_arg(af(ctx, specs),
           ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:599:16: note: in call to '&compiled.fmt->format(42ULL, ctx)'
    return fmt.format(arg, ctx);
               ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:836:13: note: in call to '&compiled->format(&string.buffer._M_elems[0], 42ULL)'
  return cf.format(out, args...);
            ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:907:12: note: in call to 'format_to(&string.buffer._M_elems[0], compiled, 42ULL)'
    return format_to(out, compiled, std::forward<Args>(args)...);
           ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:334:3: note: in call to 'format_to(&string.buffer._M_elems[0], format, 42ULL)'
  fmt::format_to(string.buffer.data(), format, args...);
  ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:367:22: note: in call to 'test_format({{}}, 42ULL)'
  EXPECT_EQ("   42", test_format<6>(FMT_COMPILE("{:5}"), 42ull));
                     ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:974:35: note: declared here
  static constexpr const unsigned prefixes[] = {0, 0, 0x1000000u | '+',
                                  ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:369:21: error: call to consteval function 'test_format<5, char, int, FMT_COMPILE_STRING>' is not a constant expression
  EXPECT_EQ("42  ", test_format<5>(FMT_COMPILE("{:<4}"), 42));
                    ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:1717:14: note: initializer of 'prefixes' is unknown
    prefix = data::prefixes[specs.sign];
             ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:2309:19: note: in call to 'write_int(&string.buffer._M_elems[0], 42, specs, {nullptr})'
    return out_ = detail::write_int(out_, value, specs_, locale_);
                  ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/core.h:1354:12: note: in call to '&af(ctx, specs)->operator()(42)'
    return vis(arg.value_.int_value);
           ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:3528:12: note: in call to 'visit_format_arg(af(ctx, specs), detail::make_arg<fmt::v7::basic_format_context<char *, char>>(val))'
    return visit_format_arg(af(ctx, specs),
           ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:599:16: note: in call to '&compiled.fmt->format(42, ctx)'
    return fmt.format(arg, ctx);
               ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:836:13: note: in call to '&compiled->format(&string.buffer._M_elems[0], 42)'
  return cf.format(out, args...);
            ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:907:12: note: in call to 'format_to(&string.buffer._M_elems[0], compiled, 42)'
    return format_to(out, compiled, std::forward<Args>(args)...);
           ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:334:3: note: in call to 'format_to(&string.buffer._M_elems[0], format, 42)'
  fmt::format_to(string.buffer.data(), format, args...);
  ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:369:21: note: in call to 'test_format({{}}, 42)'
  EXPECT_EQ("42  ", test_format<5>(FMT_COMPILE("{:<4}"), 42));
                    ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:974:35: note: declared here
  static constexpr const unsigned prefixes[] = {0, 0, 0x1000000u | '+',
                                  ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:370:21: error: call to consteval function 'test_format<5, char, int, FMT_COMPILE_STRING>' is not a constant expression
  EXPECT_EQ("  42", test_format<5>(FMT_COMPILE("{:>4}"), 42));
                    ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:1717:14: note: initializer of 'prefixes' is unknown
    prefix = data::prefixes[specs.sign];
             ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:2309:19: note: in call to 'write_int(&string.buffer._M_elems[0], 42, specs, {nullptr})'
    return out_ = detail::write_int(out_, value, specs_, locale_);
                  ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/core.h:1354:12: note: in call to '&af(ctx, specs)->operator()(42)'
    return vis(arg.value_.int_value);
           ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:3528:12: note: in call to 'visit_format_arg(af(ctx, specs), detail::make_arg<fmt::v7::basic_format_context<char *, char>>(val))'
    return visit_format_arg(af(ctx, specs),
           ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:599:16: note: in call to '&compiled.fmt->format(42, ctx)'
    return fmt.format(arg, ctx);
               ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:836:13: note: in call to '&compiled->format(&string.buffer._M_elems[0], 42)'
  return cf.format(out, args...);
            ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:907:12: note: in call to 'format_to(&string.buffer._M_elems[0], compiled, 42)'
    return format_to(out, compiled, std::forward<Args>(args)...);
           ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:334:3: note: in call to 'format_to(&string.buffer._M_elems[0], format, 42)'
  fmt::format_to(string.buffer.data(), format, args...);
  ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:370:21: note: in call to 'test_format({{}}, 42)'
  EXPECT_EQ("  42", test_format<5>(FMT_COMPILE("{:>4}"), 42));
                    ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:974:35: note: declared here
  static constexpr const unsigned prefixes[] = {0, 0, 0x1000000u | '+',
                                  ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:371:21: error: call to consteval function 'test_format<5, char, int, FMT_COMPILE_STRING>' is not a constant expression
  EXPECT_EQ(" 42 ", test_format<5>(FMT_COMPILE("{:^4}"), 42));
                    ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:1717:14: note: initializer of 'prefixes' is unknown
    prefix = data::prefixes[specs.sign];
             ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:2309:19: note: in call to 'write_int(&string.buffer._M_elems[0], 42, specs, {nullptr})'
    return out_ = detail::write_int(out_, value, specs_, locale_);
                  ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/core.h:1354:12: note: in call to '&af(ctx, specs)->operator()(42)'
    return vis(arg.value_.int_value);
           ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:3528:12: note: in call to 'visit_format_arg(af(ctx, specs), detail::make_arg<fmt::v7::basic_format_context<char *, char>>(val))'
    return visit_format_arg(af(ctx, specs),
           ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:599:16: note: in call to '&compiled.fmt->format(42, ctx)'
    return fmt.format(arg, ctx);
               ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:836:13: note: in call to '&compiled->format(&string.buffer._M_elems[0], 42)'
  return cf.format(out, args...);
            ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:907:12: note: in call to 'format_to(&string.buffer._M_elems[0], compiled, 42)'
    return format_to(out, compiled, std::forward<Args>(args)...);
           ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:334:3: note: in call to 'format_to(&string.buffer._M_elems[0], format, 42)'
  fmt::format_to(string.buffer.data(), format, args...);
  ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:371:21: note: in call to 'test_format({{}}, 42)'
  EXPECT_EQ(" 42 ", test_format<5>(FMT_COMPILE("{:^4}"), 42));
                    ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:974:35: note: declared here
  static constexpr const unsigned prefixes[] = {0, 0, 0x1000000u | '+',
                                  ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:372:22: error: call to consteval function 'test_format<6, char, int, FMT_COMPILE_STRING>' is not a constant expression
  EXPECT_EQ("**-42", test_format<6>(FMT_COMPILE("{:*>5}"), -42));
                     ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:1563:36: note: indexing of array without known bound is not allowed in a constant expression
  size_t left_padding = padding >> shifts[specs.align];
                                   ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:1577:10: note: in call to 'write_padded(&string.buffer._M_elems[0], specs, 3, 3, [=](reserve_iterator<char *> it) {
    for (unsigned int p = prefix & 16777215; p != 0; p >>= 8)
        *it++ = static_cast<char>(p & 255);
    it = detail::fill_n(it, data.padding, static_cast<char>('0'));
    return write_digits(it);
})'
  return write_padded<align>(out, specs, size, size, f);
         ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:1639:10: note: in call to 'write_padded(&string.buffer._M_elems[0], specs, 3, [=](reserve_iterator<char *> it) {
    for (unsigned int p = prefix & 16777215; p != 0; p >>= 8)
        *it++ = static_cast<char>(p & 255);
    it = detail::fill_n(it, data.padding, static_cast<char>('0'));
    return write_digits(it);
})'
  return write_padded<align::right>(
         ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:1729:12: note: in call to 'write_int(&string.buffer._M_elems[0], 2, 16777261, specs, {42, 2})'
    return write_int(
           ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:2309:19: note: in call to 'write_int(&string.buffer._M_elems[0], -42, specs, {nullptr})'
    return out_ = detail::write_int(out_, value, specs_, locale_);
                  ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/core.h:1354:12: note: in call to '&af(ctx, specs)->operator()(-42)'
    return vis(arg.value_.int_value);
           ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:3528:12: note: (skipping 1 call in backtrace; use -fconstexpr-backtrace-limit=0 to see all)
    return visit_format_arg(af(ctx, specs),
           ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:599:16: note: in call to '&compiled.fmt->format(-42, ctx)'
    return fmt.format(arg, ctx);
               ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:836:13: note: in call to '&compiled->format(&string.buffer._M_elems[0], -42)'
  return cf.format(out, args...);
            ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:907:12: note: in call to 'format_to(&string.buffer._M_elems[0], compiled, -42)'
    return format_to(out, compiled, std::forward<Args>(args)...);
           ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:334:3: note: in call to 'format_to(&string.buffer._M_elems[0], format, -42)'
  fmt::format_to(string.buffer.data(), format, args...);
  ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:372:22: note: in call to 'test_format({{}}, -42)'
  EXPECT_EQ("**-42", test_format<6>(FMT_COMPILE("{:*>5}"), -42));
                     ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
ninja: build stopped: subcommand failed.

@denchat
Copy link
Contributor Author

denchat commented Apr 6, 2021

This is output of clang 11.

C:\Users\User\AppData\Roaming\fmt>cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_MAKE_PROGRAM="C:/Program Files (x86)/Ninja/ninja.exe" -DCMAKE_SYSTEM_NAME=Windows -DCMAKE_CXX_STANDARD=20 -DCMAKE_CXX_COMPILER="C:/Program Files/mingw64/bin/clang++.exe" -DCMAKE_CXX_FLAGS="-fuse-ld=lld --target=x86_64-w64-windows-gnu --driver-mode=g++ -O3 -std=gnu++20 -lwinpthread -DNDEBUG -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_STDIO_ISO_WIDE_SPECIFIERS -Wno-unused-command-line-argument" -DCMAKE_CXX_LINK_EXECUTABLE="C:/Program Files/LLVM/bin/lld.exe" -DBUILD_SHARED_LIBS=NO -DFMT_INSTALL=NO -DFMT_DOC=NO -DFMT_TEST=YES "C:/Users/User/AppData/Roaming/fmt-master"
-- CMake version: 3.20.0
-- The CXX compiler identification is Clang 11.0.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files/mingw64/bin/clang++.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Version: 7.1.3
-- Build type: Release
-- CXX_STANDARD: 20
-- Performing Test has_std_20_flag
-- Performing Test has_std_20_flag - Success
-- Performing Test has_std_2a_flag
-- Performing Test has_std_2a_flag - Success
-- Performing Test SUPPORTS_USER_DEFINED_LITERALS
-- Performing Test SUPPORTS_USER_DEFINED_LITERALS - Success
-- Performing Test FMT_HAS_VARIANT
-- Performing Test FMT_HAS_VARIANT - Success
-- Required features: cxx_variadic_templates
-- Performing Test HAS_NULLPTR_WARNING
-- Performing Test HAS_NULLPTR_WARNING - Success
-- Looking for _strtod_l
-- Looking for _strtod_l - found
-- Performing Test FMT_HAS_MBIG_OBJ
-- Performing Test FMT_HAS_MBIG_OBJ - Failed
-- Looking for C++ include pthread.h
-- Looking for C++ include pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Performing Test HAVE_FNO_DELETE_NULL_POINTER_CHECKS
-- Performing Test HAVE_FNO_DELETE_NULL_POINTER_CHECKS - Success
-- FMT_PEDANTIC: OFF
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Users/User/AppData/Roaming/fmt

C:\Users\User\AppData\Roaming\fmt>ninja -j 2
[12/51] Linking CXX executable bin\args-test.exe
FAILED: bin/args-test.exe
cmd.exe /C "cd . && C:\PROGRA~1\mingw64\bin\CLANG_~1.EXE -fuse-ld=lld --target=x86_64-w64-windows-gnu --driver-mode=g++ -O3 -std=gnu++20 -lwinpthread -DNDEBUG -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_STDIO_ISO_WIDE_SPECIFIERS -Wno-unused-command-line-argument -O3 -DNDEBUG  test/CMakeFiles/args-test.dir/args-test.cc.obj -o bin\args-test.exe -Wl,--out-implib,test\libargs-test.dll.a -Wl,--major-image-version,0,--minor-image-version,0  -static-libgcc  -static-libstdc++  test/libtest-main.a  test/libgmock.a  libfmt.a  -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 && cd ."
lld-link: error: duplicate symbol: typeinfo name for std::exception
>>> defined at libgmock.a(gmock-gtest-all.cc.obj)
>>> defined at libstdc++.a(eh_alloc.o)

lld-link: error: duplicate symbol: typeinfo name for std::exception
>>> defined at libgmock.a(gmock-gtest-all.cc.obj)
>>> defined at libstdc++.a(eh_personality.o)

lld-link: error: duplicate symbol: typeinfo name for std::exception
>>> defined at libgmock.a(gmock-gtest-all.cc.obj)
>>> defined at libstdc++.a(new_op.o)

lld-link: error: duplicate symbol: typeinfo name for std::exception
>>> defined at libgmock.a(gmock-gtest-all.cc.obj)
>>> defined at libstdc++.a(locale.o)

lld-link: error: duplicate symbol: typeinfo for std::runtime_error
>>> defined at libgmock.a(gmock-gtest-all.cc.obj)
>>> defined at libstdc++.a(functexcept.o)

lld-link: error: duplicate symbol: typeinfo name for std::exception
>>> defined at libgmock.a(gmock-gtest-all.cc.obj)
>>> defined at libstdc++.a(functexcept.o)

lld-link: error: duplicate symbol: typeinfo name for std::runtime_error
>>> defined at libgmock.a(gmock-gtest-all.cc.obj)
>>> defined at libstdc++.a(functexcept.o)

lld-link: error: duplicate symbol: typeinfo name for std::exception
>>> defined at libgmock.a(gmock-gtest-all.cc.obj)
>>> defined at libstdc++.a(guard.o)

lld-link: error: duplicate symbol: typeinfo name for std::exception
>>> defined at libgmock.a(gmock-gtest-all.cc.obj)
>>> defined at libstdc++.a(stdexcept.o)

lld-link: error: duplicate symbol: typeinfo name for std::runtime_error
>>> defined at libgmock.a(gmock-gtest-all.cc.obj)
>>> defined at libstdc++.a(stdexcept.o)

lld-link: error: duplicate symbol: typeinfo for std::runtime_error
>>> defined at libgmock.a(gmock-gtest-all.cc.obj)
>>> defined at libstdc++.a(stdexcept.o)

lld-link: error: duplicate symbol: typeinfo name for std::exception
>>> defined at libgmock.a(gmock-gtest-all.cc.obj)
>>> defined at libstdc++.a(locale_init.o)

lld-link: error: duplicate symbol: typeinfo name for std::exception
>>> defined at libgmock.a(gmock-gtest-all.cc.obj)
>>> defined at libstdc++.a(eh_exception.o)

lld-link: error: duplicate symbol: typeinfo name for std::exception
>>> defined at libgmock.a(gmock-gtest-all.cc.obj)
>>> defined at libstdc++.a(vterminate.o)

lld-link: error: duplicate symbol: typeinfo name for std::exception
>>> defined at libgmock.a(gmock-gtest-all.cc.obj)
>>> defined at libstdc++.a(bad_alloc.o)

lld-link: error: duplicate symbol: typeinfo name for std::exception
>>> defined at libgmock.a(gmock-gtest-all.cc.obj)
>>> defined at libstdc++.a(bad_cast.o)

lld-link: error: duplicate symbol: typeinfo name for std::exception
>>> defined at libgmock.a(gmock-gtest-all.cc.obj)
>>> defined at libstdc++.a(bad_typeid.o)

lld-link: error: duplicate symbol: typeinfo name for std::exception
>>> defined at libgmock.a(gmock-gtest-all.cc.obj)
>>> defined at libstdc++.a(cxx11-ios_failure.o)

lld-link: error: duplicate symbol: typeinfo name for std::runtime_error
>>> defined at libgmock.a(gmock-gtest-all.cc.obj)
>>> defined at libstdc++.a(cxx11-ios_failure.o)

lld-link: error: duplicate symbol: typeinfo for std::runtime_error
>>> defined at libgmock.a(gmock-gtest-all.cc.obj)
>>> defined at libstdc++.a(cxx11-ios_failure.o)

lld-link: error: too many errors emitted, stopping now (use /errorlimit:0 to see all errors)
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
[13/51] Building CXX object test/CMakeFiles/compile-test.dir/compile-test.cc.obj
FAILED: test/CMakeFiles/compile-test.dir/compile-test.cc.obj
C:\PROGRA~1\mingw64\bin\CLANG_~1.EXE -DFMT_LOCALE -DGTEST_HAS_STD_WSTRING=1 -DGTEST_LANG_CXX11=1 -D_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING=1 -IC:/Users/User/AppData/Roaming/fmt-master/include -isystem C:/Users/User/AppData/Roaming/fmt-master/test/gtest -isystem C:/Users/User/AppData/Roaming/fmt-master/test/gmock -isystem C:/Users/User/AppData/Roaming/fmt-master/test/. -fuse-ld=lld --target=x86_64-w64-windows-gnu --driver-mode=g++ -O3 -std=gnu++20 -lwinpthread -DNDEBUG -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_STDIO_ISO_WIDE_SPECIFIERS -Wno-unused-command-line-argument -O3 -DNDEBUG -fno-delete-null-pointer-checks -std=gnu++20 -MD -MT test/CMakeFiles/compile-test.dir/compile-test.cc.obj -MF test\CMakeFiles\compile-test.dir\compile-test.cc.obj.d -o test/CMakeFiles/compile-test.dir/compile-test.cc.obj -c C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:342:18: error: call to consteval function 'test_format<2, char, bool, FMT_COMPILE_STRING>' is not a constant expression
  EXPECT_EQ("1", test_format<2>(FMT_COMPILE("{:d}"), true));
                 ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:1717:14: note: read of element of array without known bound is not allowed in a constant expression
    prefix = data::prefixes[specs.sign];
             ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:2309:19: note: in call to 'write_int(&string.buffer._M_elems[0], 1, specs, {nullptr})'
    return out_ = detail::write_int(out_, value, specs_, locale_);
                  ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:2319:51: note: in call to '&af(ctx, specs)->operator()(1)'
    if (specs_.type && specs_.type != 's') return (*this)(value ? 1 : 0);
                                                  ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/core.h:1372:12: note: in call to '&af(ctx, specs)->operator()(true)'
    return vis(arg.value_.bool_value);
           ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:3528:12: note: in call to 'visit_format_arg(af(ctx, specs), detail::make_arg<fmt::v7::basic_format_context<char *, char>>(val))'
    return visit_format_arg(af(ctx, specs),
           ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:599:16: note: in call to '&compiled.fmt->format(true, ctx)'
    return fmt.format(arg, ctx);
               ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:836:13: note: in call to '&compiled->format(&string.buffer._M_elems[0], true)'
  return cf.format(out, args...);
            ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:907:12: note: in call to 'format_to(&string.buffer._M_elems[0], compiled, true)'
    return format_to(out, compiled, std::forward<Args>(args)...);
           ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:334:3: note: in call to 'format_to(&string.buffer._M_elems[0], format, true)'
  fmt::format_to(string.buffer.data(), format, args...);
  ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:342:18: note: in call to 'test_format({{}}, true)'
  EXPECT_EQ("1", test_format<2>(FMT_COMPILE("{:d}"), true));
                 ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:352:20: error: call to consteval function 'test_format<4, char, int, FMT_COMPILE_STRING>' is not a constant expression
  EXPECT_EQ("+42", test_format<4>(FMT_COMPILE("{:+}"), 42));
                   ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:1717:14: note: indexing of array without known bound is not allowed in a constant expression
    prefix = data::prefixes[specs.sign];
             ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:2309:19: note: in call to 'write_int(&string.buffer._M_elems[0], 42, specs, {nullptr})'
    return out_ = detail::write_int(out_, value, specs_, locale_);
                  ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/core.h:1354:12: note: in call to '&af(ctx, specs)->operator()(42)'
    return vis(arg.value_.int_value);
           ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:3528:12: note: in call to 'visit_format_arg(af(ctx, specs), detail::make_arg<fmt::v7::basic_format_context<char *, char>>(val))'
    return visit_format_arg(af(ctx, specs),
           ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:599:16: note: in call to '&compiled.fmt->format(42, ctx)'
    return fmt.format(arg, ctx);
               ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:836:13: note: in call to '&compiled->format(&string.buffer._M_elems[0], 42)'
  return cf.format(out, args...);
            ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:907:12: note: in call to 'format_to(&string.buffer._M_elems[0], compiled, 42)'
    return format_to(out, compiled, std::forward<Args>(args)...);
           ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:334:3: note: in call to 'format_to(&string.buffer._M_elems[0], format, 42)'
  fmt::format_to(string.buffer.data(), format, args...);
  ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:352:20: note: in call to 'test_format({{}}, 42)'
  EXPECT_EQ("+42", test_format<4>(FMT_COMPILE("{:+}"), 42));
                   ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:353:19: error: call to consteval function 'test_format<3, char, int, FMT_COMPILE_STRING>' is not a constant expression
  EXPECT_EQ("42", test_format<3>(FMT_COMPILE("{:-}"), 42));
                  ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:1717:14: note: indexing of array without known bound is not allowed in a constant expression
    prefix = data::prefixes[specs.sign];
             ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:2309:19: note: in call to 'write_int(&string.buffer._M_elems[0], 42, specs, {nullptr})'
    return out_ = detail::write_int(out_, value, specs_, locale_);
                  ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/core.h:1354:12: note: in call to '&af(ctx, specs)->operator()(42)'
    return vis(arg.value_.int_value);
           ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:3528:12: note: in call to 'visit_format_arg(af(ctx, specs), detail::make_arg<fmt::v7::basic_format_context<char *, char>>(val))'
    return visit_format_arg(af(ctx, specs),
           ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:599:16: note: in call to '&compiled.fmt->format(42, ctx)'
    return fmt.format(arg, ctx);
               ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:836:13: note: in call to '&compiled->format(&string.buffer._M_elems[0], 42)'
  return cf.format(out, args...);
            ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:907:12: note: in call to 'format_to(&string.buffer._M_elems[0], compiled, 42)'
    return format_to(out, compiled, std::forward<Args>(args)...);
           ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:334:3: note: in call to 'format_to(&string.buffer._M_elems[0], format, 42)'
  fmt::format_to(string.buffer.data(), format, args...);
  ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:353:19: note: in call to 'test_format({{}}, 42)'
  EXPECT_EQ("42", test_format<3>(FMT_COMPILE("{:-}"), 42));
                  ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:354:20: error: call to consteval function 'test_format<4, char, int, FMT_COMPILE_STRING>' is not a constant expression
  EXPECT_EQ(" 42", test_format<4>(FMT_COMPILE("{: }"), 42));
                   ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:1717:14: note: indexing of array without known bound is not allowed in a constant expression
    prefix = data::prefixes[specs.sign];
             ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:2309:19: note: in call to 'write_int(&string.buffer._M_elems[0], 42, specs, {nullptr})'
    return out_ = detail::write_int(out_, value, specs_, locale_);
                  ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/core.h:1354:12: note: in call to '&af(ctx, specs)->operator()(42)'
    return vis(arg.value_.int_value);
           ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:3528:12: note: in call to 'visit_format_arg(af(ctx, specs), detail::make_arg<fmt::v7::basic_format_context<char *, char>>(val))'
    return visit_format_arg(af(ctx, specs),
           ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:599:16: note: in call to '&compiled.fmt->format(42, ctx)'
    return fmt.format(arg, ctx);
               ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:836:13: note: in call to '&compiled->format(&string.buffer._M_elems[0], 42)'
  return cf.format(out, args...);
            ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:907:12: note: in call to 'format_to(&string.buffer._M_elems[0], compiled, 42)'
    return format_to(out, compiled, std::forward<Args>(args)...);
           ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:334:3: note: in call to 'format_to(&string.buffer._M_elems[0], format, 42)'
  fmt::format_to(string.buffer.data(), format, args...);
  ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:354:20: note: in call to 'test_format({{}}, 42)'
  EXPECT_EQ(" 42", test_format<4>(FMT_COMPILE("{: }"), 42));
                   ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:358:23: error: call to consteval function 'test_format<7, char, int, FMT_COMPILE_STRING>' is not a constant expression
  EXPECT_EQ("101010", test_format<7>(FMT_COMPILE("{:b}"), 42));
                      ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:1717:14: note: read of element of array without known bound is not allowed in a constant expression
    prefix = data::prefixes[specs.sign];
             ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:2309:19: note: in call to 'write_int(&string.buffer._M_elems[0], 42, specs, {nullptr})'
    return out_ = detail::write_int(out_, value, specs_, locale_);
                  ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/core.h:1354:12: note: in call to '&af(ctx, specs)->operator()(42)'
    return vis(arg.value_.int_value);
           ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:3528:12: note: in call to 'visit_format_arg(af(ctx, specs), detail::make_arg<fmt::v7::basic_format_context<char *, char>>(val))'
    return visit_format_arg(af(ctx, specs),
           ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:599:16: note: in call to '&compiled.fmt->format(42, ctx)'
    return fmt.format(arg, ctx);
               ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:836:13: note: in call to '&compiled->format(&string.buffer._M_elems[0], 42)'
  return cf.format(out, args...);
            ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:907:12: note: in call to 'format_to(&string.buffer._M_elems[0], compiled, 42)'
    return format_to(out, compiled, std::forward<Args>(args)...);
           ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:334:3: note: in call to 'format_to(&string.buffer._M_elems[0], format, 42)'
  fmt::format_to(string.buffer.data(), format, args...);
  ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:358:23: note: in call to 'test_format({{}}, 42)'
  EXPECT_EQ("101010", test_format<7>(FMT_COMPILE("{:b}"), 42));
                      ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:359:25: error: call to consteval function 'test_format<9, char, int, FMT_COMPILE_STRING>' is not a constant expression
  EXPECT_EQ("0b101010", test_format<9>(FMT_COMPILE("{:#b}"), 42));
                        ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:1717:14: note: read of element of array without known bound is not allowed in a constant expression
    prefix = data::prefixes[specs.sign];
             ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:2309:19: note: in call to 'write_int(&string.buffer._M_elems[0], 42, specs, {nullptr})'
    return out_ = detail::write_int(out_, value, specs_, locale_);
                  ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/core.h:1354:12: note: in call to '&af(ctx, specs)->operator()(42)'
    return vis(arg.value_.int_value);
           ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:3528:12: note: in call to 'visit_format_arg(af(ctx, specs), detail::make_arg<fmt::v7::basic_format_context<char *, char>>(val))'
    return visit_format_arg(af(ctx, specs),
           ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:599:16: note: in call to '&compiled.fmt->format(42, ctx)'
    return fmt.format(arg, ctx);
               ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:836:13: note: in call to '&compiled->format(&string.buffer._M_elems[0], 42)'
  return cf.format(out, args...);
            ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:907:12: note: in call to 'format_to(&string.buffer._M_elems[0], compiled, 42)'
    return format_to(out, compiled, std::forward<Args>(args)...);
           ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:334:3: note: in call to 'format_to(&string.buffer._M_elems[0], format, 42)'
  fmt::format_to(string.buffer.data(), format, args...);
  ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:359:25: note: in call to 'test_format({{}}, 42)'
  EXPECT_EQ("0b101010", test_format<9>(FMT_COMPILE("{:#b}"), 42));
                        ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:360:25: error: call to consteval function 'test_format<9, char, int, FMT_COMPILE_STRING>' is not a constant expression
  EXPECT_EQ("0B101010", test_format<9>(FMT_COMPILE("{:#B}"), 42));
                        ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:1717:14: note: read of element of array without known bound is not allowed in a constant expression
    prefix = data::prefixes[specs.sign];
             ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:2309:19: note: in call to 'write_int(&string.buffer._M_elems[0], 42, specs, {nullptr})'
    return out_ = detail::write_int(out_, value, specs_, locale_);
                  ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/core.h:1354:12: note: in call to '&af(ctx, specs)->operator()(42)'
    return vis(arg.value_.int_value);
           ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:3528:12: note: in call to 'visit_format_arg(af(ctx, specs), detail::make_arg<fmt::v7::basic_format_context<char *, char>>(val))'
    return visit_format_arg(af(ctx, specs),
           ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:599:16: note: in call to '&compiled.fmt->format(42, ctx)'
    return fmt.format(arg, ctx);
               ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:836:13: note: in call to '&compiled->format(&string.buffer._M_elems[0], 42)'
  return cf.format(out, args...);
            ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:907:12: note: in call to 'format_to(&string.buffer._M_elems[0], compiled, 42)'
    return format_to(out, compiled, std::forward<Args>(args)...);
           ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:334:3: note: in call to 'format_to(&string.buffer._M_elems[0], format, 42)'
  fmt::format_to(string.buffer.data(), format, args...);
  ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:360:25: note: in call to 'test_format({{}}, 42)'
  EXPECT_EQ("0B101010", test_format<9>(FMT_COMPILE("{:#B}"), 42));
                        ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:361:20: error: call to consteval function 'test_format<4, char, int, FMT_COMPILE_STRING>' is not a constant expression
  EXPECT_EQ("042", test_format<4>(FMT_COMPILE("{:#o}"), 042));
                   ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:1717:14: note: read of element of array without known bound is not allowed in a constant expression
    prefix = data::prefixes[specs.sign];
             ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:2309:19: note: in call to 'write_int(&string.buffer._M_elems[0], 34, specs, {nullptr})'
    return out_ = detail::write_int(out_, value, specs_, locale_);
                  ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/core.h:1354:12: note: in call to '&af(ctx, specs)->operator()(34)'
    return vis(arg.value_.int_value);
           ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:3528:12: note: in call to 'visit_format_arg(af(ctx, specs), detail::make_arg<fmt::v7::basic_format_context<char *, char>>(val))'
    return visit_format_arg(af(ctx, specs),
           ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:599:16: note: in call to '&compiled.fmt->format(34, ctx)'
    return fmt.format(arg, ctx);
               ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:836:13: note: in call to '&compiled->format(&string.buffer._M_elems[0], 34)'
  return cf.format(out, args...);
            ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:907:12: note: in call to 'format_to(&string.buffer._M_elems[0], compiled, 34)'
    return format_to(out, compiled, std::forward<Args>(args)...);
           ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:334:3: note: in call to 'format_to(&string.buffer._M_elems[0], format, 34)'
  fmt::format_to(string.buffer.data(), format, args...);
  ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:361:20: note: in call to 'test_format({{}}, 34)'
  EXPECT_EQ("042", test_format<4>(FMT_COMPILE("{:#o}"), 042));
                   ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:362:21: error: call to consteval function 'test_format<5, char, int, FMT_COMPILE_STRING>' is not a constant expression
  EXPECT_EQ("0x4a", test_format<5>(FMT_COMPILE("{:#x}"), 0x4a));
                    ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:1717:14: note: read of element of array without known bound is not allowed in a constant expression
    prefix = data::prefixes[specs.sign];
             ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:2309:19: note: in call to 'write_int(&string.buffer._M_elems[0], 74, specs, {nullptr})'
    return out_ = detail::write_int(out_, value, specs_, locale_);
                  ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/core.h:1354:12: note: in call to '&af(ctx, specs)->operator()(74)'
    return vis(arg.value_.int_value);
           ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:3528:12: note: in call to 'visit_format_arg(af(ctx, specs), detail::make_arg<fmt::v7::basic_format_context<char *, char>>(val))'
    return visit_format_arg(af(ctx, specs),
           ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:599:16: note: in call to '&compiled.fmt->format(74, ctx)'
    return fmt.format(arg, ctx);
               ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:836:13: note: in call to '&compiled->format(&string.buffer._M_elems[0], 74)'
  return cf.format(out, args...);
            ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:907:12: note: in call to 'format_to(&string.buffer._M_elems[0], compiled, 74)'
    return format_to(out, compiled, std::forward<Args>(args)...);
           ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:334:3: note: in call to 'format_to(&string.buffer._M_elems[0], format, 74)'
  fmt::format_to(string.buffer.data(), format, args...);
  ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:362:21: note: in call to 'test_format({{}}, 74)'
  EXPECT_EQ("0x4a", test_format<5>(FMT_COMPILE("{:#x}"), 0x4a));
                    ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:363:21: error: call to consteval function 'test_format<5, char, int, FMT_COMPILE_STRING>' is not a constant expression
  EXPECT_EQ("0X4A", test_format<5>(FMT_COMPILE("{:#X}"), 0x4a));
                    ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:1717:14: note: read of element of array without known bound is not allowed in a constant expression
    prefix = data::prefixes[specs.sign];
             ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:2309:19: note: in call to 'write_int(&string.buffer._M_elems[0], 74, specs, {nullptr})'
    return out_ = detail::write_int(out_, value, specs_, locale_);
                  ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/core.h:1354:12: note: in call to '&af(ctx, specs)->operator()(74)'
    return vis(arg.value_.int_value);
           ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:3528:12: note: in call to 'visit_format_arg(af(ctx, specs), detail::make_arg<fmt::v7::basic_format_context<char *, char>>(val))'
    return visit_format_arg(af(ctx, specs),
           ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:599:16: note: in call to '&compiled.fmt->format(74, ctx)'
    return fmt.format(arg, ctx);
               ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:836:13: note: in call to '&compiled->format(&string.buffer._M_elems[0], 74)'
  return cf.format(out, args...);
            ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:907:12: note: in call to 'format_to(&string.buffer._M_elems[0], compiled, 74)'
    return format_to(out, compiled, std::forward<Args>(args)...);
           ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:334:3: note: in call to 'format_to(&string.buffer._M_elems[0], format, 74)'
  fmt::format_to(string.buffer.data(), format, args...);
  ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:363:21: note: in call to 'test_format({{}}, 74)'
  EXPECT_EQ("0X4A", test_format<5>(FMT_COMPILE("{:#X}"), 0x4a));
                    ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:365:22: error: call to consteval function 'test_format<6, char, int, FMT_COMPILE_STRING>' is not a constant expression
  EXPECT_EQ("   42", test_format<6>(FMT_COMPILE("{:5}"), 42));
                     ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:1717:14: note: read of element of array without known bound is not allowed in a constant expression
    prefix = data::prefixes[specs.sign];
             ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:2309:19: note: in call to 'write_int(&string.buffer._M_elems[0], 42, specs, {nullptr})'
    return out_ = detail::write_int(out_, value, specs_, locale_);
                  ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/core.h:1354:12: note: in call to '&af(ctx, specs)->operator()(42)'
    return vis(arg.value_.int_value);
           ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:3528:12: note: in call to 'visit_format_arg(af(ctx, specs), detail::make_arg<fmt::v7::basic_format_context<char *, char>>(val))'
    return visit_format_arg(af(ctx, specs),
           ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:599:16: note: in call to '&compiled.fmt->format(42, ctx)'
    return fmt.format(arg, ctx);
               ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:836:13: note: in call to '&compiled->format(&string.buffer._M_elems[0], 42)'
  return cf.format(out, args...);
            ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:907:12: note: in call to 'format_to(&string.buffer._M_elems[0], compiled, 42)'
    return format_to(out, compiled, std::forward<Args>(args)...);
           ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:334:3: note: in call to 'format_to(&string.buffer._M_elems[0], format, 42)'
  fmt::format_to(string.buffer.data(), format, args...);
  ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:365:22: note: in call to 'test_format({{}}, 42)'
  EXPECT_EQ("   42", test_format<6>(FMT_COMPILE("{:5}"), 42));
                     ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:366:22: error: call to consteval function 'test_format<6, char, long long, FMT_COMPILE_STRING>' is not a constant expression
  EXPECT_EQ("   42", test_format<6>(FMT_COMPILE("{:5}"), 42ll));
                     ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:1717:14: note: read of element of array without known bound is not allowed in a constant expression
    prefix = data::prefixes[specs.sign];
             ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:2309:19: note: in call to 'write_int(&string.buffer._M_elems[0], 42, specs, {nullptr})'
    return out_ = detail::write_int(out_, value, specs_, locale_);
                  ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/core.h:1358:12: note: in call to '&af(ctx, specs)->operator()(42)'
    return vis(arg.value_.long_long_value);
           ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:3528:12: note: in call to 'visit_format_arg(af(ctx, specs), detail::make_arg<fmt::v7::basic_format_context<char *, char>>(val))'
    return visit_format_arg(af(ctx, specs),
           ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:599:16: note: in call to '&compiled.fmt->format(42LL, ctx)'
    return fmt.format(arg, ctx);
               ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:836:13: note: in call to '&compiled->format(&string.buffer._M_elems[0], 42LL)'
  return cf.format(out, args...);
            ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:907:12: note: in call to 'format_to(&string.buffer._M_elems[0], compiled, 42LL)'
    return format_to(out, compiled, std::forward<Args>(args)...);
           ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:334:3: note: in call to 'format_to(&string.buffer._M_elems[0], format, 42LL)'
  fmt::format_to(string.buffer.data(), format, args...);
  ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:366:22: note: in call to 'test_format({{}}, 42LL)'
  EXPECT_EQ("   42", test_format<6>(FMT_COMPILE("{:5}"), 42ll));
                     ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:367:22: error: call to consteval function 'test_format<6, char, unsigned long long, FMT_COMPILE_STRING>' is not a constant expression
  EXPECT_EQ("   42", test_format<6>(FMT_COMPILE("{:5}"), 42ull));
                     ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:1717:14: note: read of element of array without known bound is not allowed in a constant expression
    prefix = data::prefixes[specs.sign];
             ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:2309:19: note: in call to 'write_int(&string.buffer._M_elems[0], 42, specs, {nullptr})'
    return out_ = detail::write_int(out_, value, specs_, locale_);
                  ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/core.h:1360:12: note: in call to '&af(ctx, specs)->operator()(42)'
    return vis(arg.value_.ulong_long_value);
           ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:3528:12: note: in call to 'visit_format_arg(af(ctx, specs), detail::make_arg<fmt::v7::basic_format_context<char *, char>>(val))'
    return visit_format_arg(af(ctx, specs),
           ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:599:16: note: in call to '&compiled.fmt->format(42ULL, ctx)'
    return fmt.format(arg, ctx);
               ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:836:13: note: in call to '&compiled->format(&string.buffer._M_elems[0], 42ULL)'
  return cf.format(out, args...);
            ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:907:12: note: in call to 'format_to(&string.buffer._M_elems[0], compiled, 42ULL)'
    return format_to(out, compiled, std::forward<Args>(args)...);
           ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:334:3: note: in call to 'format_to(&string.buffer._M_elems[0], format, 42ULL)'
  fmt::format_to(string.buffer.data(), format, args...);
  ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:367:22: note: in call to 'test_format({{}}, 42ULL)'
  EXPECT_EQ("   42", test_format<6>(FMT_COMPILE("{:5}"), 42ull));
                     ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:369:21: error: call to consteval function 'test_format<5, char, int, FMT_COMPILE_STRING>' is not a constant expression
  EXPECT_EQ("42  ", test_format<5>(FMT_COMPILE("{:<4}"), 42));
                    ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:1717:14: note: read of element of array without known bound is not allowed in a constant expression
    prefix = data::prefixes[specs.sign];
             ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:2309:19: note: in call to 'write_int(&string.buffer._M_elems[0], 42, specs, {nullptr})'
    return out_ = detail::write_int(out_, value, specs_, locale_);
                  ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/core.h:1354:12: note: in call to '&af(ctx, specs)->operator()(42)'
    return vis(arg.value_.int_value);
           ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:3528:12: note: in call to 'visit_format_arg(af(ctx, specs), detail::make_arg<fmt::v7::basic_format_context<char *, char>>(val))'
    return visit_format_arg(af(ctx, specs),
           ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:599:16: note: in call to '&compiled.fmt->format(42, ctx)'
    return fmt.format(arg, ctx);
               ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:836:13: note: in call to '&compiled->format(&string.buffer._M_elems[0], 42)'
  return cf.format(out, args...);
            ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:907:12: note: in call to 'format_to(&string.buffer._M_elems[0], compiled, 42)'
    return format_to(out, compiled, std::forward<Args>(args)...);
           ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:334:3: note: in call to 'format_to(&string.buffer._M_elems[0], format, 42)'
  fmt::format_to(string.buffer.data(), format, args...);
  ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:369:21: note: in call to 'test_format({{}}, 42)'
  EXPECT_EQ("42  ", test_format<5>(FMT_COMPILE("{:<4}"), 42));
                    ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:370:21: error: call to consteval function 'test_format<5, char, int, FMT_COMPILE_STRING>' is not a constant expression
  EXPECT_EQ("  42", test_format<5>(FMT_COMPILE("{:>4}"), 42));
                    ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:1717:14: note: read of element of array without known bound is not allowed in a constant expression
    prefix = data::prefixes[specs.sign];
             ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:2309:19: note: in call to 'write_int(&string.buffer._M_elems[0], 42, specs, {nullptr})'
    return out_ = detail::write_int(out_, value, specs_, locale_);
                  ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/core.h:1354:12: note: in call to '&af(ctx, specs)->operator()(42)'
    return vis(arg.value_.int_value);
           ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:3528:12: note: in call to 'visit_format_arg(af(ctx, specs), detail::make_arg<fmt::v7::basic_format_context<char *, char>>(val))'
    return visit_format_arg(af(ctx, specs),
           ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:599:16: note: in call to '&compiled.fmt->format(42, ctx)'
    return fmt.format(arg, ctx);
               ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:836:13: note: in call to '&compiled->format(&string.buffer._M_elems[0], 42)'
  return cf.format(out, args...);
            ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:907:12: note: in call to 'format_to(&string.buffer._M_elems[0], compiled, 42)'
    return format_to(out, compiled, std::forward<Args>(args)...);
           ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:334:3: note: in call to 'format_to(&string.buffer._M_elems[0], format, 42)'
  fmt::format_to(string.buffer.data(), format, args...);
  ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:370:21: note: in call to 'test_format({{}}, 42)'
  EXPECT_EQ("  42", test_format<5>(FMT_COMPILE("{:>4}"), 42));
                    ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:371:21: error: call to consteval function 'test_format<5, char, int, FMT_COMPILE_STRING>' is not a constant expression
  EXPECT_EQ(" 42 ", test_format<5>(FMT_COMPILE("{:^4}"), 42));
                    ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:1717:14: note: read of element of array without known bound is not allowed in a constant expression
    prefix = data::prefixes[specs.sign];
             ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:2309:19: note: in call to 'write_int(&string.buffer._M_elems[0], 42, specs, {nullptr})'
    return out_ = detail::write_int(out_, value, specs_, locale_);
                  ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/core.h:1354:12: note: in call to '&af(ctx, specs)->operator()(42)'
    return vis(arg.value_.int_value);
           ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:3528:12: note: in call to 'visit_format_arg(af(ctx, specs), detail::make_arg<fmt::v7::basic_format_context<char *, char>>(val))'
    return visit_format_arg(af(ctx, specs),
           ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:599:16: note: in call to '&compiled.fmt->format(42, ctx)'
    return fmt.format(arg, ctx);
               ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:836:13: note: in call to '&compiled->format(&string.buffer._M_elems[0], 42)'
  return cf.format(out, args...);
            ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:907:12: note: in call to 'format_to(&string.buffer._M_elems[0], compiled, 42)'
    return format_to(out, compiled, std::forward<Args>(args)...);
           ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:334:3: note: in call to 'format_to(&string.buffer._M_elems[0], format, 42)'
  fmt::format_to(string.buffer.data(), format, args...);
  ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:371:21: note: in call to 'test_format({{}}, 42)'
  EXPECT_EQ(" 42 ", test_format<5>(FMT_COMPILE("{:^4}"), 42));
                    ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:379:19: error: call to consteval function 'test_format<3, char, char, FMT_COMPILE_STRING>' is not a constant expression
  EXPECT_EQ("99", test_format<3>(FMT_COMPILE("{:d}"), 'c'));
                  ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:1717:14: note: read of element of array without known bound is not allowed in a constant expression
    prefix = data::prefixes[specs.sign];
             ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:2264:11: note: in call to 'write_int(&string.buffer._M_elems[0], 99, specs, {nullptr})'
          detail::write_int(formatter.out_, static_cast<int>(value),
          ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:1490:55: note: in call to '&fmt::v7::detail::arg_formatter_base<char *, char, fmt::v7::detail::error_handler>::char_spec_handler(*this, static_cast<char>(value))->on_int()'
  if (specs.type && specs.type != 'c') return handler.on_int();
                                                      ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:2313:5: note: in call to 'handle_char_specs(specs, fmt::v7::detail::arg_formatter_base<char *, char, fmt::v7::detail::error_handler>::char_spec_handler(*this, static_cast<char>(value)))'
    handle_char_specs(specs_,
    ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/core.h:1374:12: note: in call to '&af(ctx, specs)->operator()(99)'
    return vis(arg.value_.char_value);
           ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:3528:12: note: in call to 'visit_format_arg(af(ctx, specs), detail::make_arg<fmt::v7::basic_format_context<char *, char>>(val))'
    return visit_format_arg(af(ctx, specs),
           ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:599:16: note: in call to '&compiled.fmt->format('c', ctx)'
    return fmt.format(arg, ctx);
               ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:836:13: note: in call to '&compiled->format(&string.buffer._M_elems[0], 'c')'
  return cf.format(out, args...);
            ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:907:12: note: in call to 'format_to(&string.buffer._M_elems[0], compiled, 'c')'
    return format_to(out, compiled, std::forward<Args>(args)...);
           ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:334:3: note: in call to 'format_to(&string.buffer._M_elems[0], format, 'c')'
  fmt::format_to(string.buffer.data(), format, args...);
  ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:379:19: note: in call to 'test_format({{}}, 'c')'
  EXPECT_EQ("99", test_format<3>(FMT_COMPILE("{:d}"), 'c'));
                  ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:399:23: error: call to consteval function 'test_format<8, char, int, FMT_COMPILE_STRING>' is not a constant expression
  EXPECT_EQ("жж42", test_format<8>(FMT_COMPILE("{:ж>4}"), 42));
                    ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:1717:14: note: read of element of array without known bound is not allowed in a constant expression
    prefix = data::prefixes[specs.sign];
             ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:2309:19: note: in call to 'write_int(&string.buffer._M_elems[0], 42, specs, {nullptr})'
    return out_ = detail::write_int(out_, value, specs_, locale_);
                  ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/core.h:1354:12: note: in call to '&af(ctx, specs)->operator()(42)'
    return vis(arg.value_.int_value);
           ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:3528:12: note: in call to 'visit_format_arg(af(ctx, specs), detail::make_arg<fmt::v7::basic_format_context<char *, char>>(val))'
    return visit_format_arg(af(ctx, specs),
           ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:599:16: note: in call to '&compiled.fmt->format(42, ctx)'
    return fmt.format(arg, ctx);
               ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:836:13: note: in call to '&compiled->format(&string.buffer._M_elems[0], 42)'
  return cf.format(out, args...);
            ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:907:12: note: in call to 'format_to(&string.buffer._M_elems[0], compiled, 42)'
    return format_to(out, compiled, std::forward<Args>(args)...);
           ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:334:3: note: in call to 'format_to(&string.buffer._M_elems[0], format, 42)'
  fmt::format_to(string.buffer.data(), format, args...);
  ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:399:23: note: in call to 'test_format({{}}, 42)'
  EXPECT_EQ("жж42", test_format<8>(FMT_COMPILE("{:ж>4}"), 42));
                    ^
18 errors generated.
ninja: build stopped: subcommand failed.

@denchat
Copy link
Contributor Author

denchat commented Apr 6, 2021

I'm not sure why clang 11 complains about gmock duplicated symbols while clang 12 doesn't.
Both point out the same error:

C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:342:18: error: call to consteval function 'test_format<2, char, bool, FMT_COMPILE_STRING>' is not a constant expression
  EXPECT_EQ("1", test_format<2>(FMT_COMPILE("{:d}"), true));
                 ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:1717:14: note: read of element of array without known bound is not allowed in a constant expression
    prefix = data::prefixes[specs.sign];
             ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:2309:19: note: in call to 'write_int(&string.buffer._M_elems[0], 1, specs, {nullptr})'
    return out_ = detail::write_int(out_, value, specs_, locale_);
                  ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:2319:51: note: in call to '&af(ctx, specs)->operator()(1)'
    if (specs_.type && specs_.type != 's') return (*this)(value ? 1 : 0);
                                                  ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/core.h:1372:12: note: in call to '&af(ctx, specs)->operator()(true)'
    return vis(arg.value_.bool_value);
           ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/format.h:3528:12: note: in call to 'visit_format_arg(af(ctx, specs), detail::make_arg<fmt::basic_format_context<char *, char>>(val))'
    return visit_format_arg(af(ctx, specs),
           ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:599:16: note: in call to '&compiled.fmt->format(true, ctx)'
    return fmt.format(arg, ctx);
               ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:836:13: note: in call to '&compiled->format(&string.buffer._M_elems[0], true)'
  return cf.format(out, args...);
            ^
C:/Users/User/AppData/Roaming/fmt-master/include\fmt/compile.h:907:12: note: in call to 'format_to(&string.buffer._M_elems[0], compiled, true)'
    return format_to(out, compiled, std::forward<Args>(args)...);
           ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:334:3: note: in call to 'format_to(&string.buffer._M_elems[0], format, true)'
  fmt::format_to(string.buffer.data(), format, args...);
  ^
C:/Users/User/AppData/Roaming/fmt-master/test/compile-test.cc:342:18: note: in call to 'test_format({{}}, true)'
  EXPECT_EQ("1", test_format<2>(FMT_COMPILE("{:d}"), true));

@vitaut
Copy link
Contributor

vitaut commented Apr 6, 2021

Do you have a godbolt repro?

@denchat
Copy link
Contributor Author

denchat commented Apr 6, 2021

I still have no clues to create CE repro.
I'm trying to figure out this issue.

GCC 10.2 and 11.0.1 can cmake it through.
However FormatterTest.Precision fails in both version.

Still, this seems not to related with my clang issue.

PS C:\Users\User\AppData\Roaming\fmt\bin> .\format-test.exe
[==========] Running 131 tests from 13 test cases.
[----------] Global test environment set-up.
[----------] 58 tests from FormatterTest
[ RUN      ] FormatterTest.TestFormattersEnabled
[       OK ] FormatterTest.TestFormattersEnabled (0 ms)
[ RUN      ] FormatterTest.Escape
[       OK ] FormatterTest.Escape (0 ms)
[ RUN      ] FormatterTest.UnmatchedBraces
[       OK ] FormatterTest.UnmatchedBraces (0 ms)
[ RUN      ] FormatterTest.NoArgs
[       OK ] FormatterTest.NoArgs (0 ms)
[ RUN      ] FormatterTest.ArgsInDifferentPositions
[       OK ] FormatterTest.ArgsInDifferentPositions (0 ms)
[ RUN      ] FormatterTest.ArgErrors
[       OK ] FormatterTest.ArgErrors (0 ms)
[ RUN      ] FormatterTest.ManyArgs
[       OK ] FormatterTest.ManyArgs (0 ms)
[ RUN      ] FormatterTest.NamedArg
[       OK ] FormatterTest.NamedArg (0 ms)
[ RUN      ] FormatterTest.AutoArgIndex
[       OK ] FormatterTest.AutoArgIndex (0 ms)
[ RUN      ] FormatterTest.EmptySpecs
[       OK ] FormatterTest.EmptySpecs (0 ms)
[ RUN      ] FormatterTest.LeftAlign
[       OK ] FormatterTest.LeftAlign (0 ms)
[ RUN      ] FormatterTest.RightAlign
[       OK ] FormatterTest.RightAlign (0 ms)
[ RUN      ] FormatterTest.CenterAlign
[       OK ] FormatterTest.CenterAlign (0 ms)
[ RUN      ] FormatterTest.Fill
[       OK ] FormatterTest.Fill (0 ms)
[ RUN      ] FormatterTest.PlusSign
[       OK ] FormatterTest.PlusSign (0 ms)
[ RUN      ] FormatterTest.MinusSign
[       OK ] FormatterTest.MinusSign (0 ms)
[ RUN      ] FormatterTest.SpaceSign
[       OK ] FormatterTest.SpaceSign (0 ms)
[ RUN      ] FormatterTest.SignNotTruncated
[       OK ] FormatterTest.SignNotTruncated (0 ms)
[ RUN      ] FormatterTest.HashFlag
[       OK ] FormatterTest.HashFlag (0 ms)
[ RUN      ] FormatterTest.ZeroFlag
[       OK ] FormatterTest.ZeroFlag (0 ms)
[ RUN      ] FormatterTest.Width
[       OK ] FormatterTest.Width (0 ms)
[ RUN      ] FormatterTest.RuntimeWidth
[       OK ] FormatterTest.RuntimeWidth (0 ms)
[ RUN      ] FormatterTest.Precision
C:/Users/User/AppData/Roaming/fmt-master/test/format-test.cc:997: Failure
Value of: format("{:.838A}", -2.14001164E+38)
  Actual: "-0XA.0FF1FFF38E4F0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000P+124"
Expected: "-0X1.41FE3FFE71C9E000000000000000000000000000000000000000000000000000000" "000000000000000000000000000000000000000000000000000000000000000000000000" "000000000000000000000000000000000000000000000000000000000000000000000000" "000000000000000000000000000000000000000000000000000000000000000000000000" "000000000000000000000000000000000000000000000000000000000000000000000000" "000000000000000000000000000000000000000000000000000000000000000000000000" "000000000000000000000000000000000000000000000000000000000000000000000000" "000000000000000000000000000000000000000000000000000000000000000000000000" "000000000000000000000000000000000000000000000000000000000000000000000000" "000000000000000000000000000000000000000000000000000000000000000000000000" "000000000000000000000000000000000000000000000000000000000000000000000000" "000000000000000000000000000000000000000000000000000P+127"
Which is: "-0X1.41FE3FFE71C9E000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000P+127"
[  FAILED  ] FormatterTest.Precision (332 ms)
[ RUN      ] FormatterTest.RuntimePrecision
[       OK ] FormatterTest.RuntimePrecision (0 ms)
[ RUN      ] FormatterTest.FormatShort
[       OK ] FormatterTest.FormatShort (0 ms)
[ RUN      ] FormatterTest.FormatInt
[       OK ] FormatterTest.FormatInt (0 ms)
[ RUN      ] FormatterTest.FormatBin
[       OK ] FormatterTest.FormatBin (0 ms)
[ RUN      ] FormatterTest.FormatDec
[       OK ] FormatterTest.FormatDec (0 ms)
[ RUN      ] FormatterTest.FormatHex
[       OK ] FormatterTest.FormatHex (0 ms)
[ RUN      ] FormatterTest.FormatOct
[       OK ] FormatterTest.FormatOct (0 ms)
[ RUN      ] FormatterTest.FormatIntLocale
[       OK ] FormatterTest.FormatIntLocale (0 ms)
[ RUN      ] FormatterTest.FormatConvertibleToLongLong
[       OK ] FormatterTest.FormatConvertibleToLongLong (0 ms)
[ RUN      ] FormatterTest.FormatFloat
[       OK ] FormatterTest.FormatFloat (0 ms)
[ RUN      ] FormatterTest.FormatDouble
[       OK ] FormatterTest.FormatDouble (15 ms)
[ RUN      ] FormatterTest.PrecisionRounding
[       OK ] FormatterTest.PrecisionRounding (0 ms)
[ RUN      ] FormatterTest.PrettifyFloat
[       OK ] FormatterTest.PrettifyFloat (0 ms)
[ RUN      ] FormatterTest.FormatNaN
[       OK ] FormatterTest.FormatNaN (0 ms)
[ RUN      ] FormatterTest.FormatInfinity
[       OK ] FormatterTest.FormatInfinity (0 ms)
[ RUN      ] FormatterTest.FormatLongDouble
[       OK ] FormatterTest.FormatLongDouble (0 ms)
[ RUN      ] FormatterTest.FormatChar
[       OK ] FormatterTest.FormatChar (0 ms)
[ RUN      ] FormatterTest.FormatVolatileChar
[       OK ] FormatterTest.FormatVolatileChar (0 ms)
[ RUN      ] FormatterTest.FormatUnsignedChar
[       OK ] FormatterTest.FormatUnsignedChar (0 ms)
[ RUN      ] FormatterTest.FormatWChar
[       OK ] FormatterTest.FormatWChar (0 ms)
[ RUN      ] FormatterTest.FormatCString
[       OK ] FormatterTest.FormatCString (15 ms)
[ RUN      ] FormatterTest.FormatSCharString
[       OK ] FormatterTest.FormatSCharString (0 ms)
[ RUN      ] FormatterTest.FormatUCharString
[       OK ] FormatterTest.FormatUCharString (0 ms)
[ RUN      ] FormatterTest.FormatPointer
[       OK ] FormatterTest.FormatPointer (0 ms)
[ RUN      ] FormatterTest.FormatString
[       OK ] FormatterTest.FormatString (0 ms)
[ RUN      ] FormatterTest.FormatStringView
[       OK ] FormatterTest.FormatStringView (0 ms)
[ RUN      ] FormatterTest.FormatStdStringView
[       OK ] FormatterTest.FormatStdStringView (0 ms)
[ RUN      ] FormatterTest.FormatExplicitlyConvertibleToStdStringView
[       OK ] FormatterTest.FormatExplicitlyConvertibleToStdStringView (0 ms)
[ RUN      ] FormatterTest.FormatCustom
[       OK ] FormatterTest.FormatCustom (0 ms)
[ RUN      ] FormatterTest.CustomFormat
[       OK ] FormatterTest.CustomFormat (0 ms)
[ RUN      ] FormatterTest.CustomFormatTo
[       OK ] FormatterTest.CustomFormatTo (0 ms)
[ RUN      ] FormatterTest.WideFormatString
[       OK ] FormatterTest.WideFormatString (0 ms)
[ RUN      ] FormatterTest.FormatStringFromSpeedTest
[       OK ] FormatterTest.FormatStringFromSpeedTest (0 ms)
[ RUN      ] FormatterTest.FormatExamples
[       OK ] FormatterTest.FormatExamples (0 ms)
[ RUN      ] FormatterTest.Examples
[       OK ] FormatterTest.Examples (0 ms)
[----------] 58 tests from FormatterTest (987 ms total)

[----------] 8 tests from UtilTest
[ RUN      ] UtilTest.BitCast
[       OK ] UtilTest.BitCast (0 ms)
[ RUN      ] UtilTest.Increment
[       OK ] UtilTest.Increment (0 ms)
[ RUN      ] UtilTest.ParseNonnegativeInt
Skipping parse_nonnegative_int test
[       OK ] UtilTest.ParseNonnegativeInt (0 ms)
[ RUN      ] UtilTest.UTF8ToUTF16
[       OK ] UtilTest.UTF8ToUTF16 (0 ms)
[ RUN      ] UtilTest.UTF8ToUTF16EmptyString
[       OK ] UtilTest.UTF8ToUTF16EmptyString (0 ms)
[ RUN      ] UtilTest.FormatSystemError
warning: std::allocator allocates 9223372036854775807 chars[       OK ] UtilTest.FormatSystemError (0 ms)
[ RUN      ] UtilTest.SystemError
[       OK ] UtilTest.SystemError (0 ms)
[ RUN      ] UtilTest.ReportSystemError
[       OK ] UtilTest.ReportSystemError (0 ms)
[----------] 8 tests from UtilTest (0 ms total)

[----------] 2 tests from IteratorTest
[ RUN      ] IteratorTest.CountingIterator
[       OK ] IteratorTest.CountingIterator (0 ms)
[ RUN      ] IteratorTest.IsOutputIterator
[       OK ] IteratorTest.IsOutputIterator (0 ms)
[----------] 2 tests from IteratorTest (0 ms total)

[----------] 9 tests from MemoryBufferTest
[ RUN      ] MemoryBufferTest.Ctor
[       OK ] MemoryBufferTest.Ctor (0 ms)
[ RUN      ] MemoryBufferTest.MoveCtorInlineBuffer
[       OK ] MemoryBufferTest.MoveCtorInlineBuffer (0 ms)
[ RUN      ] MemoryBufferTest.MoveCtorDynamicBuffer
[       OK ] MemoryBufferTest.MoveCtorDynamicBuffer (0 ms)
[ RUN      ] MemoryBufferTest.MoveAssignment
[       OK ] MemoryBufferTest.MoveAssignment (0 ms)
[ RUN      ] MemoryBufferTest.Grow
[       OK ] MemoryBufferTest.Grow (0 ms)
[ RUN      ] MemoryBufferTest.Allocator
[       OK ] MemoryBufferTest.Allocator (0 ms)
[ RUN      ] MemoryBufferTest.ExceptionInDeallocate
[       OK ] MemoryBufferTest.ExceptionInDeallocate (0 ms)
[ RUN      ] MemoryBufferTest.AllocatorMaxSize
[       OK ] MemoryBufferTest.AllocatorMaxSize (0 ms)
[ RUN      ] MemoryBufferTest.AllocatorMaxSizeOverflow
[       OK ] MemoryBufferTest.AllocatorMaxSizeOverflow (0 ms)
[----------] 9 tests from MemoryBufferTest (0 ms total)

[----------] 1 test from AllocatorTest
[ RUN      ] AllocatorTest.allocator_ref
[       OK ] AllocatorTest.allocator_ref (0 ms)
[----------] 1 test from AllocatorTest (0 ms total)

[----------] 2 tests from BufferAppenderTest
[ RUN      ] BufferAppenderTest.BufferAppenderDefaultConstruct
[       OK ] BufferAppenderTest.BufferAppenderDefaultConstruct (0 ms)
[ RUN      ] BufferAppenderTest.BufferAppenderOutputIterator
[       OK ] BufferAppenderTest.BufferAppenderOutputIterator (0 ms)
[----------] 2 tests from BufferAppenderTest (16 ms total)

[----------] 1 test from StringViewTest
[ RUN      ] StringViewTest.Ctor
[       OK ] StringViewTest.Ctor (0 ms)
[----------] 1 test from StringViewTest (0 ms total)

[----------] 4 tests from FormatToTest
[ RUN      ] FormatToTest.FormatWithoutArgs
[       OK ] FormatToTest.FormatWithoutArgs (0 ms)
[ RUN      ] FormatToTest.Format
[       OK ] FormatToTest.Format (0 ms)
[ RUN      ] FormatToTest.WideString
[       OK ] FormatToTest.WideString (0 ms)
[ RUN      ] FormatToTest.FormatToMemoryBuffer
[       OK ] FormatToTest.FormatToMemoryBuffer (0 ms)
[----------] 4 tests from FormatToTest (0 ms total)

[----------] 1 test from BoolTest
[ RUN      ] BoolTest.FormatBool
[       OK ] BoolTest.FormatBool (0 ms)
[----------] 1 test from BoolTest (0 ms total)

[----------] 40 tests from FormatTest
[ RUN      ] FormatTest.FormatExplicitlyConvertibleToWStringView
[       OK ] FormatTest.FormatExplicitlyConvertibleToWStringView (0 ms)
[ RUN      ] FormatTest.FormatForeignStrings
[       OK ] FormatTest.FormatForeignStrings (0 ms)
[ RUN      ] FormatTest.Print
[       OK ] FormatTest.Print (0 ms)
[ RUN      ] FormatTest.Variadic
[       OK ] FormatTest.Variadic (0 ms)
[ RUN      ] FormatTest.Dynamic
[       OK ] FormatTest.Dynamic (0 ms)
[ RUN      ] FormatTest.Bytes
[       OK ] FormatTest.Bytes (0 ms)
[ RUN      ] FormatTest.JoinArg
[       OK ] FormatTest.JoinArg (0 ms)
[ RUN      ] FormatTest.JoinBytes
[       OK ] FormatTest.JoinBytes (0 ms)
[ RUN      ] FormatTest.FormatMessageExample
[       OK ] FormatTest.FormatMessageExample (0 ms)
[ RUN      ] FormatTest.UnpackedArgs
[       OK ] FormatTest.UnpackedArgs (0 ms)
[ RUN      ] FormatTest.CompileTimeString
[       OK ] FormatTest.CompileTimeString (0 ms)
[ RUN      ] FormatTest.CustomFormatCompileTimeString
[       OK ] FormatTest.CustomFormatCompileTimeString (0 ms)
[ RUN      ] FormatTest.UdlTemplate
[       OK ] FormatTest.UdlTemplate (0 ms)
[ RUN      ] FormatTest.UdlPassUserDefinedObjectAsLvalue
[       OK ] FormatTest.UdlPassUserDefinedObjectAsLvalue (0 ms)
[ RUN      ] FormatTest.Enum
[       OK ] FormatTest.Enum (0 ms)
[ RUN      ] FormatTest.FormatterNotSpecialized
[       OK ] FormatTest.FormatterNotSpecialized (0 ms)
[ RUN      ] FormatTest.NonNullTerminatedFormatString
[       OK ] FormatTest.NonNullTerminatedFormatString (0 ms)
[ RUN      ] FormatTest.DynamicFormatter
[       OK ] FormatTest.DynamicFormatter (0 ms)
[ RUN      ] FormatTest.ToString
[       OK ] FormatTest.ToString (0 ms)
[ RUN      ] FormatTest.ToWString
[       OK ] FormatTest.ToWString (0 ms)
[ RUN      ] FormatTest.OutputIterators
[       OK ] FormatTest.OutputIterators (0 ms)
[ RUN      ] FormatTest.FormattedSize
[       OK ] FormatTest.FormattedSize (0 ms)
[ RUN      ] FormatTest.FormatTo
[       OK ] FormatTest.FormatTo (0 ms)
[ RUN      ] FormatTest.FormatToPropagatesExceptions
[       OK ] FormatTest.FormatToPropagatesExceptions (0 ms)
[ RUN      ] FormatTest.FormatToN
[       OK ] FormatTest.FormatToN (0 ms)
[ RUN      ] FormatTest.WideFormatToN
[       OK ] FormatTest.WideFormatToN (0 ms)
[ RUN      ] FormatTest.FormatToNOutputIterator
[       OK ] FormatTest.FormatToNOutputIterator (0 ms)
[ RUN      ] FormatTest.ConstexprParseArgID
[       OK ] FormatTest.ConstexprParseArgID (0 ms)
[ RUN      ] FormatTest.ConstexprParseFormatSpecs
[       OK ] FormatTest.ConstexprParseFormatSpecs (0 ms)
[ RUN      ] FormatTest.ConstexprSpecsHandler
[       OK ] FormatTest.ConstexprSpecsHandler (0 ms)
[ RUN      ] FormatTest.ConstexprDynamicSpecsHandler
[       OK ] FormatTest.ConstexprDynamicSpecsHandler (0 ms)
[ RUN      ] FormatTest.ConstexprSpecsChecker
[       OK ] FormatTest.ConstexprSpecsChecker (0 ms)
[ RUN      ] FormatTest.ConstexprParseFormatString
[       OK ] FormatTest.ConstexprParseFormatString (0 ms)
[ RUN      ] FormatTest.FormatStringErrors
[       OK ] FormatTest.FormatStringErrors (0 ms)
[ RUN      ] FormatTest.VFormatTo
[       OK ] FormatTest.VFormatTo (0 ms)
[ RUN      ] FormatTest.FmtStringInTemplate
[       OK ] FormatTest.FmtStringInTemplate (0 ms)
[ RUN      ] FormatTest.CharTraitsIsNotAmbiguous
[       OK ] FormatTest.CharTraitsIsNotAmbiguous (0 ms)
[ RUN      ] FormatTest.FormatCustomChar
[       OK ] FormatTest.FormatCustomChar (0 ms)
[ RUN      ] FormatTest.FormatUTF8Precision
[       OK ] FormatTest.FormatUTF8Precision (0 ms)
[ RUN      ] FormatTest.BackInsertSlicing
[       OK ] FormatTest.BackInsertSlicing (0 ms)
[----------] 40 tests from FormatTest (47 ms total)

[----------] 2 tests from FormatIntTest
[ RUN      ] FormatIntTest.Data
[       OK ] FormatIntTest.Data (0 ms)
[ RUN      ] FormatIntTest.FormatInt
[       OK ] FormatIntTest.FormatInt (0 ms)
[----------] 2 tests from FormatIntTest (0 ms total)

[----------] 1 test from StrTest
[ RUN      ] StrTest.Convert
[       OK ] StrTest.Convert (0 ms)
[----------] 1 test from StrTest (0 ms total)

[----------] 2 tests from LiteralsTest
[ RUN      ] LiteralsTest.Format
[       OK ] LiteralsTest.Format (0 ms)
[ RUN      ] LiteralsTest.NamedArg
[       OK ] LiteralsTest.NamedArg (0 ms)
[----------] 2 tests from LiteralsTest (0 ms total)

[----------] Global test environment tear-down
[==========] 131 tests from 13 test cases ran. (1088 ms total)
[  PASSED  ] 130 tests.
[  FAILED  ] 1 test, listed below:
[  FAILED  ] FormatterTest.Precision

 1 FAILED TEST

@alexezeder
Copy link
Contributor

alexezeder commented Apr 6, 2021

Repro on Compiler Explorer with Clang 11 (but trunk also fails): https://compiler-explorer.com/z/oWfGGrGs3
Should we add a more recent Clang to CI? Because I expect it to fail more and more over time. Even if it's a one-time task to fix current problems with formatting at compile-time with Clang, still any future changes can break this code at compile-time with Clang.

@vitaut vitaut reopened this Apr 6, 2021
@alexezeder
Copy link
Contributor

But I don't understand why FormatterTest.Precision fails. This is way more interesting...

@vitaut
Copy link
Contributor

vitaut commented Apr 7, 2021

Should we add a more recent Clang to CI?

Good idea, a PR is welcome =).

@vitaut
Copy link
Contributor

vitaut commented Apr 7, 2021

Reopening since there is also a portability issue in precision test:

[ RUN      ] FormatterTest.Precision
C:/Users/User/AppData/Roaming/fmt-master/test/format-test.cc:997: Failure
Value of: format("{:.838A}", -2.14001164E+38)
  Actual: "-0XA.0FF1FFF38E4F0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000P+124"
Expected: "-0X1.41FE3FFE71C9E000000000000000000000000000000000000000000000000000000" "000000000000000000000000000000000000000000000000000000000000000000000000" "000000000000000000000000000000000000000000000000000000000000000000000000" "000000000000000000000000000000000000000000000000000000000000000000000000" "000000000000000000000000000000000000000000000000000000000000000000000000" "000000000000000000000000000000000000000000000000000000000000000000000000" "000000000000000000000000000000000000000000000000000000000000000000000000" "000000000000000000000000000000000000000000000000000000000000000000000000" "000000000000000000000000000000000000000000000000000000000000000000000000" "000000000000000000000000000000000000000000000000000000000000000000000000" "000000000000000000000000000000000000000000000000000000000000000000000000" "000000000000000000000000000000000000000000000000000P+127"
Which is: "-0X1.41FE3FFE71C9E000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000P+127"

@vitaut vitaut reopened this Apr 7, 2021
@alexezeder
Copy link
Contributor

I think that error in FormatterTest.Precision indicates that this code:

#include <cstdio>
int main() { printf("%.*A\n", 838, -2.14001164E+38); }

should also print an incorrect result -0XA.0FF1FFF38E4F..., but not -0X1.41FE3FFE71C9E....

@vitaut
Copy link
Contributor

vitaut commented Apr 7, 2021

The values are equal so maybe all we need is to relax this test.

@denchat
Copy link
Contributor Author

denchat commented Apr 7, 2021

static_assert(-0XA.0FF1FFF38E4FP+124 == -0X1.41FE3FFE71C9EP+127);

[LIVE]
This stuns me awhile until I try to do this, it makes sense indeed.

A term: 0b1010 dot 0000'1111'...
1 term: 0b0001 dot 0100'0001'...

However why on earth does the compiler "have the right" to shift the dot to the right at the 1st place ?!
I thought 0x1. is the only format the compiler can present.

@vitaut
Copy link
Contributor

vitaut commented Apr 7, 2021

I'm not sure but I worked around the hexfloat issue in 5a8bf1f. Thanks for reporting.

@vitaut vitaut closed this as completed Apr 7, 2021
@alexezeder
Copy link
Contributor

From C (not C++, don't think they differ) standard (draft, actually) about a and A specifiers in a format string for fprintf:

A double argument representing a floating-point number is converted in the
style [−]0xh.hhhh p±d, where there is one hexadecimal digit (which is
nonzero if the argument is a normalized floating-point number and is
otherwise unspecified) before the decimal-point character*

* Binary implementations can choose the hexadecimal digit to the left of the decimal-point character so
that subsequent digits align to nibble (4-bit) boundaries.

So there is no guarantee that the first digit will be 1, which is usually true.

Maybe it will be more portable to use scanf and compare the parsed value?

@vitaut
Copy link
Contributor

vitaut commented Apr 7, 2021

scanf can have issues of its own. There are only 2 possibilities depending on whether an implementation decides to align or not, so it's not hard to deal with. In the future we'll get rid of the printf fallback altogether.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants