Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Author

anonymous

over 6 years ago

Language

C++

Compiler

gcc HEAD 10.0.0 20190825 (experimental)

Options
Warnings
Boost 1.70.0
C++2a(GNU)
no pedantic
Raw compiler options
-D FMT_HEADER_ONLY -D FMT_EXCEPTIONS=0 -U NDEBUG

Author

anonymous

over 6 years ago

fmt/format.h
fmt/core.h
fmt/format-inl.h

$ g++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.70.0/gcc-head/include -std=gnu++2a -D FMT_HEADER_ONLY -D FMT_EXCEPTIONS=0 -U NDEBUG
In file included from prog.cc:1:
fmt/format.h: In instantiation of 'void fmt::v6::internal::check_format_string(S) [with <template-parameter-1-1> = {int}; S = main()::<lambda()>::str; typename std::enable_if<fmt::v6::is_compile_string<S>::value, int>::type <anonymous> = 0]':
fmt/core.h:1290:67:   required from 'fmt::v6::format_arg_store<fmt::v6::basic_format_context<std::back_insert_iterator<fmt::v6::internal::buffer<Char> >, Char>, fmt::v6::remove_reference_t<Args>...> fmt::v6::internal::make_args_checked(const S&, fmt::v6::remove_reference_t<Args>& ...) [with Args = {int}; S = main()::<lambda()>::str; Char = char]'
fmt/core.h:1416:46:   required from 'void fmt::v6::print(const S&, Args&& ...) [with S = main()::<lambda()>::str; Args = {int}; typename std::enable_if<fmt::v6::internal::is_string<S>::value, int>::type <anonymous> = 0]'
prog.cc:12:33:   required from here
fmt/format.h:2589:73:   in 'constexpr' expansion of 'fmt::v6::internal::do_check_format_string<char, fmt::v6::internal::error_handler, int>(fmt::v6::to_string_view<main()::<lambda()>::str>(format_str), fmt::v6::internal::error_handler())'
fmt/format.h:2580:28:   in 'constexpr' expansion of 'fmt::v6::internal::parse_format_string<true, char, fmt::v6::internal::format_string_checker<char, fmt::v6::internal::error_handler, int>&>(s, checker)'
fmt/format.h:2491:3:   in 'constexpr' expansion of '(& handler)->fmt::v6::internal::format_string_checker<char, fmt::v6::internal::error_handler, int>::on_text_end()'
fmt/format.h:2529:43:   in 'constexpr' expansion of '((fmt::v6::internal::format_string_checker<char, fmt::v6::internal::error_handler, int>*)this)->fmt::v6::internal::format_string_checker<char, fmt::v6::internal::error_handler, int>::on_error(((const char*)"too many arguments"))'
fmt/format.h:2556:5: error: 'constexpr void fmt::v6::basic_parse_context<Char, ErrorHandler>::on_error(const char*) [with Char = char; ErrorHandler = fmt::v6::internal::error_handler]' called in a constant expression
 2556 |     context_.on_error(message);
      |     ^~~~~~~~
In file included from fmt/format.h:46,
                 from prog.cc:1:
fmt/core.h:473:22: note: 'constexpr void fmt::v6::basic_parse_context<Char, ErrorHandler>::on_error(const char*) [with Char = char; ErrorHandler = fmt::v6::internal::error_handler]' is not usable as a 'constexpr' function because:
  473 |   FMT_CONSTEXPR void on_error(const char* message) {
      |                      ^~~~~~~~
fmt/core.h:474:27: error: call to non-'constexpr' function 'void fmt::v6::internal::error_handler::on_error(const char*)'
  474 |     ErrorHandler::on_error(message);
      |     ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~
In file included from prog.cc:1:
fmt/format.h: In instantiation of 'void fmt::v6::internal::check_format_string(S) [with <template-parameter-1-1> = {int}; S = main()::<lambda()>::str; typename std::enable_if<fmt::v6::is_compile_string<S>::value, int>::type <anonymous> = 0]':
fmt/core.h:1290:67:   required from 'fmt::v6::format_arg_store<fmt::v6::basic_format_context<std::back_insert_iterator<fmt::v6::internal::buffer<Char> >, Char>, fmt::v6::remove_reference_t<Args>...> fmt::v6::internal::make_args_checked(const S&, fmt::v6::remove_reference_t<Args>& ...) [with Args = {int}; S = main()::<lambda()>::str; Char = char]'
fmt/core.h:1416:46:   required from 'void fmt::v6::print(const S&, Args&& ...) [with S = main()::<lambda()>::str; Args = {int}; typename std::enable_if<fmt::v6::internal::is_string<S>::value, int>::type <anonymous> = 0]'
prog.cc:13:43:   required from here
fmt/format.h:2589:73:   in 'constexpr' expansion of 'fmt::v6::internal::do_check_format_string<char, fmt::v6::internal::error_handler, int>(fmt::v6::to_string_view<main()::<lambda()>::str>(format_str), fmt::v6::internal::error_handler())'
fmt/format.h:2580:28:   in 'constexpr' expansion of 'fmt::v6::internal::parse_format_string<true, char, fmt::v6::internal::format_string_checker<char, fmt::v6::internal::error_handler, int>&>(s, checker)'
fmt/format.h:2465:7:   in 'constexpr' expansion of '(& handler)->fmt::v6::internal::format_string_checker<char, fmt::v6::internal::error_handler, int>::on_text_end()'
fmt/format.h:2529:43:   in 'constexpr' expansion of '((fmt::v6::internal::format_string_checker<char, fmt::v6::internal::error_handler, int>*)this)->fmt::v6::internal::format_string_checker<char, fmt::v6::internal::error_handler, int>::on_error(((const char*)"too many arguments"))'
fmt/format.h:2556:5: error: 'constexpr void fmt::v6::basic_parse_context<Char, ErrorHandler>::on_error(const char*) [with Char = char; ErrorHandler = fmt::v6::internal::error_handler]' called in a constant expression
 2556 |     context_.on_error(message);
      |     ^~~~~~~~
fmt/format.h: In instantiation of 'void fmt::v6::internal::check_format_string(S) [with <template-parameter-1-1> = {int, int}; S = main()::<lambda()>::str; typename std::enable_if<fmt::v6::is_compile_string<S>::value, int>::type <anonymous> = 0]':
fmt/core.h:1290:67:   required from 'fmt::v6::format_arg_store<fmt::v6::basic_format_context<std::back_insert_iterator<fmt::v6::internal::buffer<Char> >, Char>, fmt::v6::remove_reference_t<Args>...> fmt::v6::internal::make_args_checked(const S&, fmt::v6::remove_reference_t<Args>& ...) [with Args = {int, int}; S = main()::<lambda()>::str; Char = char]'
fmt/core.h:1416:46:   required from 'void fmt::v6::print(const S&, Args&& ...) [with S = main()::<lambda()>::str; Args = {int, int}; typename std::enable_if<fmt::v6::internal::is_string<S>::value, int>::type <anonymous> = 0]'
prog.cc:14:49:   required from here
fmt/format.h:2589:73:   in 'constexpr' expansion of 'fmt::v6::internal::do_check_format_string<char, fmt::v6::internal::error_handler, int, int>(fmt::v6::to_string_view<main()::<lambda()>::str>(format_str), fmt::v6::internal::error_handler())'
fmt/format.h:2580:28:   in 'constexpr' expansion of 'fmt::v6::internal::parse_format_string<true, char, fmt::v6::internal::format_string_checker<char, fmt::v6::internal::error_handler, int, int>&>(s, checker)'
fmt/format.h:2465:7:   in 'constexpr' expansion of '(& handler)->fmt::v6::internal::format_string_checker<char, fmt::v6::internal::error_handler, int, int>::on_text_end()'
fmt/format.h:2529:43:   in 'constexpr' expansion of '((fmt::v6::internal::format_string_checker<char, fmt::v6::internal::error_handler, int, int>*)this)->fmt::v6::internal::format_string_checker<char, fmt::v6::internal::error_handler, int, int>::on_error(((const char*)"too many arguments"))'
fmt/format.h:2556:5: error: 'constexpr void fmt::v6::basic_parse_context<Char, ErrorHandler>::on_error(const char*) [with Char = char; ErrorHandler = fmt::v6::internal::error_handler]' called in a constant expression
fmt/format.h: In instantiation of 'void fmt::v6::internal::check_format_string(S) [with <template-parameter-1-1> = {int, int, int}; S = main()::<lambda()>::str; typename std::enable_if<fmt::v6::is_compile_string<S>::value, int>::type <anonymous> = 0]':
fmt/core.h:1290:67:   required from 'fmt::v6::format_arg_store<fmt::v6::basic_format_context<std::back_insert_iterator<fmt::v6::internal::buffer<Char> >, Char>, fmt::v6::remove_reference_t<Args>...> fmt::v6::internal::make_args_checked(const S&, fmt::v6::remove_reference_t<Args>& ...) [with Args = {int, int, int}; S = main()::<lambda()>::str; Char = char]'
fmt/core.h:1416:46:   required from 'void fmt::v6::print(const S&, Args&& ...) [with S = main()::<lambda()>::str; Args = {int, int, int}; typename std::enable_if<fmt::v6::internal::is_string<S>::value, int>::type <anonymous> = 0]'
prog.cc:15:52:   required from here
fmt/format.h:2589:73:   in 'constexpr' expansion of 'fmt::v6::internal::do_check_format_string<char, fmt::v6::internal::error_handler, int, int, int>(fmt::v6::to_string_view<main()::<lambda()>::str>(format_str), fmt::v6::internal::error_handler())'
fmt/format.h:2580:28:   in 'constexpr' expansion of 'fmt::v6::internal::parse_format_string<true, char, fmt::v6::internal::format_string_checker<char, fmt::v6::internal::error_handler, int, int, int>&>(s, checker)'
fmt/format.h:2465:7:   in 'constexpr' expansion of '(& handler)->fmt::v6::internal::format_string_checker<char, fmt::v6::internal::error_handler, int, int, int>::on_text_end()'
fmt/format.h:2529:43:   in 'constexpr' expansion of '((fmt::v6::internal::format_string_checker<char, fmt::v6::internal::error_handler, int, int, int>*)this)->fmt::v6::internal::format_string_checker<char, fmt::v6::internal::error_handler, int, int, int>::on_error(((const char*)"too many arguments"))'
fmt/format.h:2556:5: error: 'constexpr void fmt::v6::basic_parse_context<Char, ErrorHandler>::on_error(const char*) [with Char = char; ErrorHandler = fmt::v6::internal::error_handler]' called in a constant expression
fmt/format.h: In instantiation of 'void fmt::v6::internal::check_format_string(S) [with <template-parameter-1-1> = {int, int}; S = main()::<lambda()>::str; typename std::enable_if<fmt::v6::is_compile_string<S>::value, int>::type <anonymous> = 0]':
fmt/core.h:1290:67:   required from 'fmt::v6::format_arg_store<fmt::v6::basic_format_context<std::back_insert_iterator<fmt::v6::internal::buffer<Char> >, Char>, fmt::v6::remove_reference_t<Args>...> fmt::v6::internal::make_args_checked(const S&, fmt::v6::remove_reference_t<Args>& ...) [with Args = {int, int}; S = main()::<lambda()>::str; Char = char]'
fmt/core.h:1416:46:   required from 'void fmt::v6::print(const S&, Args&& ...) [with S = main()::<lambda()>::str; Args = {int, int}; typename std::enable_if<fmt::v6::internal::is_string<S>::value, int>::type <anonymous> = 0]'
prog.cc:16:57:   required from here
fmt/format.h:2589:73:   in 'constexpr' expansion of 'fmt::v6::internal::do_check_format_string<char, fmt::v6::internal::error_handler, int, int>(fmt::v6::to_string_view<main()::<lambda()>::str>(format_str), fmt::v6::internal::error_handler())'
fmt/format.h:2580:28:   in 'constexpr' expansion of 'fmt::v6::internal::parse_format_string<true, char, fmt::v6::internal::format_string_checker<char, fmt::v6::internal::error_handler, int, int>&>(s, checker)'
fmt/format.h:2472:7:   in 'constexpr' expansion of '(& handler)->fmt::v6::internal::format_string_checker<char, fmt::v6::internal::error_handler, int, int>::on_arg_id()'
fmt/format.h:2535:5:   in 'constexpr' expansion of '((fmt::v6::internal::format_string_checker<char, fmt::v6::internal::error_handler, int, int>*)this)->fmt::v6::internal::format_string_checker<char, fmt::v6::internal::error_handler, int, int>::check_arg_id()'
fmt/format.h:2564:30: error: 'constexpr void fmt::v6::basic_parse_context<Char, ErrorHandler>::on_error(const char*) [with Char = char; ErrorHandler = fmt::v6::internal::error_handler]' called in a constant expression
 2564 |     if (arg_id_ >= num_args) context_.on_error("argument index out of range");
      |                              ^~~~~~~~
Exit Code:
1