Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Author

anonymous

about 2 years ago

Language

C++

Compiler

gcc HEAD 14.0.0 20230528 (experimental)

Options
Warnings
Don't Use Boost
C++2b(GNU)
-pedantic-errors

Author

anonymous

about 2 years ago

$ g++ prog.cc -Wall -Wextra -std=gnu++2b -pedantic-errors
In file included from prog.cc:1:
/opt/wandbox/gcc-head/include/c++/14.0.0/format: In instantiation of 'static std::__format::_Arg_store<_Context, _Args>::_Element_t std::__format::_Arg_store<_Context, _Args>::_S_make_elt(_Tp&) [with _Tp = enum_t; _Context = std::basic_format_context<std::__format::_Sink_iter<char>, char>; _Args = {std::basic_format_arg<std::basic_format_context<std::__format::_Sink_iter<char>, char> >::handle}; _Element_t = std::__format::_Arg_store<std::basic_format_context<std::__format::_Sink_iter<char>, char>, std::basic_format_arg<std::basic_format_context<std::__format::_Sink_iter<char>, char> >::handle>::_Element_t]':
/opt/wandbox/gcc-head/include/c++/14.0.0/format:3252:23:   required from 'std::__format::_Arg_store<_Context, _Args>::_Arg_store(_Tp& ...) [with _Tp = {enum_t}; _Context = std::basic_format_context<std::__format::_Sink_iter<char>, char>; _Args = {std::basic_format_arg<std::basic_format_context<std::__format::_Sink_iter<char>, char> >::handle}]'
/opt/wandbox/gcc-head/include/c++/14.0.0/format:3301:14:   required from 'auto std::make_format_args(_Args&& ...) [with _Context = basic_format_context<__format::_Sink_iter<char>, char>; _Args = {enum_t&}]'
/opt/wandbox/gcc-head/include/c++/14.0.0/format:3714:61:   required from 'std::string std::format(format_string<_Args ...>, _Args&& ...) [with _Args = {enum_t}; string = __cxx11::basic_string<char>; format_string<_Args ...> = basic_format_string<char, enum_t>]'
prog.cc:17:29:   required from here
/opt/wandbox/gcc-head/include/c++/14.0.0/format:3241:38: error: no matching function for call to 'std::basic_format_arg<std::basic_format_context<std::__format::_Sink_iter<char>, char> >::basic_format_arg(enum_t&)'
 3241 |           basic_format_arg<_Context> __arg(__v);
      |                                      ^~~~~
/opt/wandbox/gcc-head/include/c++/14.0.0/format:2996:9: note: candidate: 'template<class _Tp>  requires  __formattable_with<_Tp, _Context, typename _Context::formatter_type<typename std::remove_const<_Tp>::type>, std::basic_format_parse_context<typename _Context::char_type> > std::basic_format_arg<_Context>::basic_format_arg(_Tp&) [with _Context = std::basic_format_context<std::__format::_Sink_iter<char>, char>]'
 2996 |         basic_format_arg(_Tp& __v) noexcept
      |         ^~~~~~~~~~~~~~~~
/opt/wandbox/gcc-head/include/c++/14.0.0/format:2996:9: note:   template argument deduction/substitution failed:
/opt/wandbox/gcc-head/include/c++/14.0.0/format:2996:9: note: constraints not satisfied
/opt/wandbox/gcc-head/include/c++/14.0.0/format: In substitution of 'template<class _Tp>  requires  __formattable_with<_Tp, _Context, typename _Context::formatter_type<typename std::remove_const<_Tp>::type>, std::basic_format_parse_context<typename _Context::char_type> > std::basic_format_arg<std::basic_format_context<std::__format::_Sink_iter<char>, char> >::basic_format_arg(_Tp&) [with _Tp = std::basic_format_context<std::__format::_Sink_iter<char>, char>]':
/opt/wandbox/gcc-head/include/c++/14.0.0/format:3241:31:   required from 'static std::__format::_Arg_store<_Context, _Args>::_Element_t std::__format::_Arg_store<_Context, _Args>::_S_make_elt(_Tp&) [with _Tp = enum_t; _Context = std::basic_format_context<std::__format::_Sink_iter<char>, char>; _Args = {std::basic_format_arg<std::basic_format_context<std::__format::_Sink_iter<char>, char> >::handle}; _Element_t = std::__format::_Arg_store<std::basic_format_context<std::__format::_Sink_iter<char>, char>, std::basic_format_arg<std::basic_format_context<std::__format::_Sink_iter<char>, char> >::handle>::_Element_t]'
/opt/wandbox/gcc-head/include/c++/14.0.0/format:3252:23:   required from 'std::__format::_Arg_store<_Context, _Args>::_Arg_store(_Tp& ...) [with _Tp = {enum_t}; _Context = std::basic_format_context<std::__format::_Sink_iter<char>, char>; _Args = {std::basic_format_arg<std::basic_format_context<std::__format::_Sink_iter<char>, char> >::handle}]'
/opt/wandbox/gcc-head/include/c++/14.0.0/format:3301:14:   required from 'auto std::make_format_args(_Args&& ...) [with _Context = basic_format_context<__format::_Sink_iter<char>, char>; _Args = {enum_t&}]'
/opt/wandbox/gcc-head/include/c++/14.0.0/format:3714:61:   required from 'std::string std::format(format_string<_Args ...>, _Args&& ...) [with _Args = {enum_t}; string = __cxx11::basic_string<char>; format_string<_Args ...> = basic_format_string<char, enum_t>]'
prog.cc:17:29:   required from here
/opt/wandbox/gcc-head/include/c++/14.0.0/format:2197:13:   required for the satisfaction of '__formattable_with<_Tp, _Context, typename _Context::formatter_type<typename std::remove_const<_Tp>::type>, std::basic_format_parse_context<typename _Context::char_type> >' [with _Tp = enum_t; _Context = std::basic_format_context<std::__format::_Sink_iter<char>, char>]
/opt/wandbox/gcc-head/include/c++/14.0.0/format:2199:7:   in requirements with 'const _Formatter __cf', '_Tp&& __t', '_Context __fc' [with _Formatter = std::formatter<enum_t, char>; _Tp = enum_t; _Context = std::basic_format_context<std::__format::_Sink_iter<char>, char>]
/opt/wandbox/gcc-head/include/c++/14.0.0/format:2201:20: note: the required expression '__cf.format(__t, __fc)' is invalid
 2201 |       { __cf.format(__t, __fc) } -> same_as<typename _Context::iterator>;
      |         ~~~~~~~~~~~^~~~~~~~~~~
/opt/wandbox/gcc-head/include/c++/14.0.0/format: In instantiation of 'static std::__format::_Arg_store<_Context, _Args>::_Element_t std::__format::_Arg_store<_Context, _Args>::_S_make_elt(_Tp&) [with _Tp = enum_t; _Context = std::basic_format_context<std::__format::_Sink_iter<char>, char>; _Args = {std::basic_format_arg<std::basic_format_context<std::__format::_Sink_iter<char>, char> >::handle}; _Element_t = std::__format::_Arg_store<std::basic_format_context<std::__format::_Sink_iter<char>, char>, std::basic_format_arg<std::basic_format_context<std::__format::_Sink_iter<char>, char> >::handle>::_Element_t]':
/opt/wandbox/gcc-head/include/c++/14.0.0/format:3252:23:   required from 'std::__format::_Arg_store<_Context, _Args>::_Arg_store(_Tp& ...) [with _Tp = {enum_t}; _Context = std::basic_format_context<std::__format::_Sink_iter<char>, char>; _Args = {std::basic_format_arg<std::basic_format_context<std::__format::_Sink_iter<char>, char> >::handle}]'
/opt/wandbox/gcc-head/include/c++/14.0.0/format:3301:14:   required from 'auto std::make_format_args(_Args&& ...) [with _Context = basic_format_context<__format::_Sink_iter<char>, char>; _Args = {enum_t&}]'
/opt/wandbox/gcc-head/include/c++/14.0.0/format:3714:61:   required from 'std::string std::format(format_string<_Args ...>, _Args&& ...) [with _Args = {enum_t}; string = __cxx11::basic_string<char>; format_string<_Args ...> = basic_format_string<char, enum_t>]'
prog.cc:17:29:   required from here
cc1plus: note: set '-fconcepts-diagnostics-depth=' to at least 2 for more detail
/opt/wandbox/gcc-head/include/c++/14.0.0/format:2808:7: note: candidate: 'std::basic_format_arg<_Context>::basic_format_arg() [with _Context = std::basic_format_context<std::__format::_Sink_iter<char>, char>]'
 2808 |       basic_format_arg() noexcept : _M_type(__format::_Arg_none) { }
      |       ^~~~~~~~~~~~~~~~
/opt/wandbox/gcc-head/include/c++/14.0.0/format:2808:7: note:   candidate expects 0 arguments, 1 provided
/opt/wandbox/gcc-head/include/c++/14.0.0/format:2746:11: note: candidate: 'constexpr std::basic_format_arg<std::basic_format_context<std::__format::_Sink_iter<char>, char> >::basic_format_arg(const std::basic_format_arg<std::basic_format_context<std::__format::_Sink_iter<char>, char> >&)'
 2746 |     class basic_format_arg
      |           ^~~~~~~~~~~~~~~~
/opt/wandbox/gcc-head/include/c++/14.0.0/format:2746:11: note:   no known conversion for argument 1 from 'enum_t' to 'const std::basic_format_arg<std::basic_format_context<std::__format::_Sink_iter<char>, char> >&'
/opt/wandbox/gcc-head/include/c++/14.0.0/format:2746:11: note: candidate: 'constexpr std::basic_format_arg<std::basic_format_context<std::__format::_Sink_iter<char>, char> >::basic_format_arg(std::basic_format_arg<std::basic_format_context<std::__format::_Sink_iter<char>, char> >&&)'
/opt/wandbox/gcc-head/include/c++/14.0.0/format:2746:11: note:   no known conversion for argument 1 from 'enum_t' to 'std::basic_format_arg<std::basic_format_context<std::__format::_Sink_iter<char>, char> >&&'
Exit Code:
1