Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Author

anonymous

11 months ago

Language

C++

Compiler

gcc HEAD 15.0.0 20240711 (experimental)

Options
Warnings
Don't Use Boost
C++2a
-pedantic

Author

anonymous

11 months ago

$ g++ prog.cc -Wall -Wextra -std=c++2a -pedantic
prog.cc: In instantiation of 'struct std::formatter<demo::outer_t::threshold_t<int>, char>':
/opt/wandbox/gcc-head/include/c++/15.0.0/type_traits:3487:54:   required from 'constexpr const bool std::is_default_constructible_v<std::formatter<demo::outer_t::threshold_t<int>, char> >'
 3487 |   inline constexpr bool is_default_constructible_v = __is_constructible(_Tp);
      |                                                      ^~~~~~~~~~~~~~~~~~~~~~~
/opt/wandbox/gcc-head/include/c++/15.0.0/format:4067:3:   required from 'class std::__format::_Checking_scanner<char, demo::outer_t::threshold_t<int>, demo::outer_t::threshold_t<long unsigned int> >'
 4067 |         (is_default_constructible_v<formatter<_Args, _CharT>> && ...),
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/wandbox/gcc-head/include/c++/15.0.0/format:4212:4:   required from 'consteval std::basic_format_string<_CharT, _Args>::basic_format_string(const _Tp&) [with _Tp = char [22]; _CharT = char; _Args = {const demo::outer_t::threshold_t<int>&, const demo::outer_t::threshold_t<long unsigned int>&}]'
 4212 |           __scanner(_M_str);
      |           ^~~~~~~~~
prog.cc:49:30:   required from here
   49 |         return std::format_to(ctx.out(), "(first:{}, second:{})", what.m_first, what.m_second);
      |                ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
prog.cc:41:38: error: 'template<class T> class demo::outer_t::threshold_t' is private within this context
   41 |     auto format(const demo::outer_t::threshold_t<T>& what, std::format_context& ctx) const {
      |                                      ^~~~~~~~~~~~~~
prog.cc:11:11: note: declared private here
   11 |     class threshold_t
      |           ^~~~~~~~~~~
prog.cc: In instantiation of 'struct std::formatter<demo::outer_t::threshold_t<long unsigned int>, char>':
/opt/wandbox/gcc-head/include/c++/15.0.0/type_traits:3487:54:   required from 'constexpr const bool std::is_default_constructible_v<std::formatter<demo::outer_t::threshold_t<long unsigned int>, char> >'
 3487 |   inline constexpr bool is_default_constructible_v = __is_constructible(_Tp);
      |                                                      ^~~~~~~~~~~~~~~~~~~~~~~
/opt/wandbox/gcc-head/include/c++/15.0.0/format:4067:3:   required from 'class std::__format::_Checking_scanner<char, demo::outer_t::threshold_t<int>, demo::outer_t::threshold_t<long unsigned int> >'
 4067 |         (is_default_constructible_v<formatter<_Args, _CharT>> && ...),
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/wandbox/gcc-head/include/c++/15.0.0/format:4212:4:   required from 'consteval std::basic_format_string<_CharT, _Args>::basic_format_string(const _Tp&) [with _Tp = char [22]; _CharT = char; _Args = {const demo::outer_t::threshold_t<int>&, const demo::outer_t::threshold_t<long unsigned int>&}]'
 4212 |           __scanner(_M_str);
      |           ^~~~~~~~~
prog.cc:49:30:   required from here
   49 |         return std::format_to(ctx.out(), "(first:{}, second:{})", what.m_first, what.m_second);
      |                ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
prog.cc:41:38: error: 'template<class T> class demo::outer_t::threshold_t' is private within this context
   41 |     auto format(const demo::outer_t::threshold_t<T>& what, std::format_context& ctx) const {
      |                                      ^~~~~~~~~~~~~~
prog.cc:11:11: note: declared private here
   11 |     class threshold_t
      |           ^~~~~~~~~~~
Exit Code:
1