spdlog icon indicating copy to clipboard operation
spdlog copied to clipboard

Build fail with gcc C++20 and -DSPDLOG_USE_STD_FORMAT=ON

Open shazni opened this issue 1 year ago • 4 comments

I've been using v1.8.5 without -DSPDLOG_USE_STD_FORMAT=ON. Now that officially gcc 13 is available in package managers in Fedora 38 I tried building v1.11.0 which gives a build error in examples.cpp. And also I tried with clang as well and it fails with the same error.

g++ (GCC) 13.1.1 20230426 (Red Hat 13.1.1-1) clang version 16.0.1 (Fedora 16.0.1-1.fc38)

[ 77%] Built target spdlog [ 88%] Building CXX object example/CMakeFiles/example.dir/example.cpp.o In file included from /home/vagrant/ProjectFiles/codes/orbit/spdlog/include/spdlog/sinks/udp_sink.h:12, from /home/vagrant/ProjectFiles/codes/orbit/spdlog/example/example.cpp:232: /home/vagrant/ProjectFiles/codes/orbit/spdlog/include/spdlog/details/udp_client.h: In constructor ‘spdlog::details::udp_client::udp_client(const std::string&, uint16_t)’: /home/vagrant/ProjectFiles/codes/orbit/spdlog/include/spdlog/details/udp_client.h:68:11: error: ‘::memset’ has not been declared 68 | ::memset(sockAddr_.sin_zero, 0x00, sizeof(sockAddr_.sin_zero)); | ^~~~~~ /home/vagrant/ProjectFiles/codes/orbit/spdlog/include/spdlog/details/udp_client.h:22:1: note: ‘memset’ is defined in header ‘<cstring>’; did you forget to ‘#include <cstring>’? 21 | #include <netinet/udp.h> +++ |+#include <cstring> 22 | In file included from /usr/include/c++/13/bits/chrono_io.h:39, from /usr/include/c++/13/chrono:3330, from /home/vagrant/ProjectFiles/codes/orbit/spdlog/example/example.cpp:8: /usr/include/c++/13/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 = spdlog::details::dump_info<__gnu_cxx::__normal_iterator<const char*, std::vector<char> > >; _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]’: /usr/include/c++/13/format:3252:23: required from ‘std::__format::_Arg_store<_Context, _Args>::_Arg_store(_Tp& ...) [with _Tp = {spdlog::details::dump_info<__gnu_cxx::__normal_iterator<const char*, std::vector<char, std::allocator<char> > > >}; _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}]’ /usr/include/c++/13/format:3301:14: required from ‘auto std::make_format_args(_Args&& ...) [with _Context = basic_format_context<__format::_Sink_iter<char>, char>; _Args = {spdlog::details::dump_info<__gnu_cxx::__normal_iterator<const char*, vector<char, allocator<char> > > >}]’ /home/vagrant/ProjectFiles/codes/orbit/spdlog/include/spdlog/logger.h:372:88: required from ‘void spdlog::logger::log_(spdlog::source_loc, spdlog::level::level_enum, spdlog::string_view_t, Args&& ...) [with Args = {spdlog::details::dump_info<__gnu_cxx::__normal_iterator<const char*, std::vector<char, std::allocator<char> > > >}; spdlog::string_view_t = std::basic_string_view<char>]’ /home/vagrant/ProjectFiles/codes/orbit/spdlog/include/spdlog/logger.h:90:13: required from ‘void spdlog::logger::log(spdlog::source_loc, spdlog::level::level_enum, spdlog::format_string_t<Args ...>, Args&& ...) [with Args = {spdlog::details::dump_info<__gnu_cxx::__normal_iterator<const char*, std::vector<char, std::allocator<char> > > >}; spdlog::format_string_t<Args ...> = std::basic_string_view<char>]’ /home/vagrant/ProjectFiles/codes/orbit/spdlog/include/spdlog/logger.h:96:12: required from ‘void spdlog::logger::log(spdlog::level::level_enum, spdlog::format_string_t<Args ...>, Args&& ...) [with Args = {spdlog::details::dump_info<__gnu_cxx::__normal_iterator<const char*, std::vector<char, std::allocator<char> > > >}; spdlog::format_string_t<Args ...> = std::basic_string_view<char>]’ /home/vagrant/ProjectFiles/codes/orbit/spdlog/include/spdlog/logger.h:158:12: required from ‘void spdlog::logger::info(spdlog::format_string_t<Args ...>, Args&& ...) [with Args = {spdlog::details::dump_info<__gnu_cxx::__normal_iterator<const char*, std::vector<char, std::allocator<char> > > >}; spdlog::format_string_t<Args ...> = std::basic_string_view<char>]’ /home/vagrant/ProjectFiles/codes/orbit/spdlog/include/spdlog/spdlog.h:161:31: required from ‘void spdlog::info(format_string_t<Args ...>, Args&& ...)[with Args = {details::dump_info<__gnu_cxx::__normal_iterator<const char*, std::vector<char, std::allocator<char> > > >}; format_string_t<Args ...> = std::basic_string_view<char>]’ /home/vagrant/ProjectFiles/codes/orbit/spdlog/example/example.cpp:183:17: required from here /usr/include/c++/13/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(spdlog::details::dump_info<__gnu_cxx::__normal_iterator<const char*, std::vector<char> > >&)’ 3241 | basic_format_arg<_Context> __arg(__v); | ^~~~~ /usr/include/c++/13/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 | ^~~~~~~~~~~~~~~~ /usr/include/c++/13/format:2996:9: note: template argument deduction/substitution failed: /usr/include/c++/13/format:2996:9: note: constraints not satisfied In file included from /usr/include/c++/13/bits/chrono.h:43, from /usr/include/c++/13/chrono:41: /usr/include/c++/13/concepts: 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>]’: /usr/include/c++/13/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 = spdlog::details::dump_info<__gnu_cxx::__normal_iterator<const char*, std::vector<char> > >; _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]’ /usr/include/c++/13/format:3252:23: required from ‘std::__format::_Arg_store<_Context, _Args>::_Arg_store(_Tp& ...) [with _Tp = {spdlog::details::dump_info<__gnu_cxx::__normal_iterator<const char*, std::vector<char, std::allocator<char> > > >}; _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}]’ /usr/include/c++/13/format:3301:14: required from ‘auto std::make_format_args(_Args&& ...) [with _Context = basic_format_context<__format::_Sink_iter<char>, char>; _Args = {spdlog::details::dump_info<__gnu_cxx::__normal_iterator<const char*, vector<char, allocator<char> > > >}]’ /home/vagrant/ProjectFiles/codes/orbit/spdlog/include/spdlog/logger.h:372:88: required from ‘void spdlog::logger::log_(spdlog::source_loc, spdlog::level::level_enum, spdlog::string_view_t, Args&& ...) [with Args = {spdlog::details::dump_info<__gnu_cxx::__normal_iterator<const char*, std::vector<char, std::allocator<char> > > >}; spdlog::string_view_t = std::basic_string_view<char>]’ /home/vagrant/ProjectFiles/codes/orbit/spdlog/include/spdlog/logger.h:90:13: required from ‘void spdlog::logger::log(spdlog::source_loc, spdlog::level::level_enum, spdlog::format_string_t<Args ...>, Args&& ...) [with Args = {spdlog::details::dump_info<__gnu_cxx::__normal_iterator<const char*, std::vector<char, std::allocator<char> > > >}; spdlog::format_string_t<Args ...> = std::basic_string_view<char>]’ /home/vagrant/ProjectFiles/codes/orbit/spdlog/include/spdlog/logger.h:96:12: required from ‘void spdlog::logger::log(spdlog::level::level_enum, spdlog::format_string_t<Args ...>, Args&& ...) [with Args = {spdlog::details::dump_info<__gnu_cxx::__normal_iterator<const char*, std::vector<char, std::allocator<char> > > >}; spdlog::format_string_t<Args ...> = std::basic_string_view<char>]’ /home/vagrant/ProjectFiles/codes/orbit/spdlog/include/spdlog/logger.h:158:12: required from ‘void spdlog::logger::info(spdlog::format_string_t<Args ...>, Args&& ...) [with Args = {spdlog::details::dump_info<__gnu_cxx::__normal_iterator<const char*, std::vector<char, std::allocator<char> > > >}; spdlog::format_string_t<Args ...> = std::basic_string_view<char>]’ /home/vagrant/ProjectFiles/codes/orbit/spdlog/include/spdlog/spdlog.h:161:31: required from ‘void spdlog::info(format_string_t<Args ...>, Args&& ...)[with Args = {details::dump_info<__gnu_cxx::__normal_iterator<const char*, std::vector<char, std::allocator<char> > > >}; format_string_t<Args ...> = std::basic_string_view<char>]’ /home/vagrant/ProjectFiles/codes/orbit/spdlog/example/example.cpp:183:17: required from here /usr/include/c++/13/concepts:139:13: required for the satisfaction of ‘assignable_from<_Tp&, _Tp>’ [with _Tp = std::formatter<spdlog::details::dump_info<__gnu_cxx::__normal_iterator<const char*, std::vector<char, std::allocator<char> > > >, char>] /usr/include/c++/13/concepts:263:13: required for the satisfaction of ‘movable<_Tp>’ [with _Tp = std::formatter<spdlog::details::dump_info<__gnu_cxx::__normal_iterator<const char*, std::vector<char, std::allocator<char> > > >, char>] /usr/include/c++/13/concepts:267:13: required for the satisfaction of ‘copyable<_Tp>’ [with _Tp = std::formatter<spdlog::details::dump_info<__gnu_cxx::__normal_iterator<const char*, std::vector<char, std::allocator<char> > > >, char>] /usr/include/c++/13/concepts:272:13: required for the satisfaction of ‘semiregular<_Formatter>’ [with _Formatter = std::formatter<spdlog::details::dump_info<__gnu_cxx::__normal_iterator<const char*, std::vector<char, std::allocator<char> > > >, char>] /usr/include/c++/13/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 = spdlog::details::dump_info<__gnu_cxx::__normal_iterator<const char*, std::vector<char, std::allocator<char> > > >; _Context = std::basic_format_context<std::__format::_Sink_iter<char>, char>] /usr/include/c++/13/concepts:142:10: in requirements with ‘_Lhs __lhs’, ‘_Rhs&& __rhs’ [with _Lhs = std::formatter<spdlog::details::dump_info<__gnu_cxx::__normal_iterator<const char*, std::vector<char, std::allocator<char> > > >, char>&; _Rhs = std::formatter<spdlog::details::dump_info<__gnu_cxx::__normal_iterator<const char*, std::vector<char, std::allocator<char> > > >, char>] /usr/include/c++/13/concepts:143:17: note: the required expression ‘__lhs = static_cast<_Rhs&&>(__rhs)’ is invalid 143 | { __lhs = static_cast<_Rhs&&>(__rhs) } -> same_as<_Lhs>; | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/13/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 = spdlog::details::dump_info<__gnu_cxx::__normal_iterator<const char*, std::vector<char> > >; _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]’: /usr/include/c++/13/format:3252:23: required from ‘std::__format::_Arg_store<_Context, _Args>::_Arg_store(_Tp& ...) [with _Tp = {spdlog::details::dump_info<__gnu_cxx::__normal_iterator<const char*, std::vector<char, std::allocator<char> > > >}; _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}]’ /usr/include/c++/13/format:3301:14: required from ‘auto std::make_format_args(_Args&& ...) [with _Context = basic_format_context<__format::_Sink_iter<char>, char>; _Args = {spdlog::details::dump_info<__gnu_cxx::__normal_iterator<const char*, vector<char, allocator<char> > > >}]’ /home/vagrant/ProjectFiles/codes/orbit/spdlog/include/spdlog/logger.h:372:88: required from ‘void spdlog::logger::log_(spdlog::source_loc, spdlog::level::level_enum, spdlog::string_view_t, Args&& ...) [with Args = {spdlog::details::dump_info<__gnu_cxx::__normal_iterator<const char*, std::vector<char, std::allocator<char> > > >}; spdlog::string_view_t = std::basic_string_view<char>]’ /home/vagrant/ProjectFiles/codes/orbit/spdlog/include/spdlog/logger.h:90:13: required from ‘void spdlog::logger::log(spdlog::source_loc, spdlog::level::level_enum, spdlog::format_string_t<Args ...>, Args&& ...) [with Args = {spdlog::details::dump_info<__gnu_cxx::__normal_iterator<const char*, std::vector<char, std::allocator<char> > > >}; spdlog::format_string_t<Args ...> = std::basic_string_view<char>]’ /home/vagrant/ProjectFiles/codes/orbit/spdlog/include/spdlog/logger.h:96:12: required from ‘void spdlog::logger::log(spdlog::level::level_enum, spdlog::format_string_t<Args ...>, Args&& ...) [with Args = {spdlog::details::dump_info<__gnu_cxx::__normal_iterator<const char*, std::vector<char, std::allocator<char> > > >}; spdlog::format_string_t<Args ...> = std::basic_string_view<char>]’ /home/vagrant/ProjectFiles/codes/orbit/spdlog/include/spdlog/logger.h:158:12: required from ‘void spdlog::logger::info(spdlog::format_string_t<Args ...>, Args&& ...) [with Args = {spdlog::details::dump_info<__gnu_cxx::__normal_iterator<const char*, std::vector<char, std::allocator<char> > > >}; spdlog::format_string_t<Args ...> = std::basic_string_view<char>]’ /home/vagrant/ProjectFiles/codes/orbit/spdlog/include/spdlog/spdlog.h:161:31: required from ‘void spdlog::info(format_string_t<Args ...>, Args&& ...)[with Args = {details::dump_info<__gnu_cxx::__normal_iterator<const char*, std::vector<char, std::allocator<char> > > >}; format_string_t<Args ...> = std::basic_string_view<char>]’ /home/vagrant/ProjectFiles/codes/orbit/spdlog/example/example.cpp:183:17: required from here cc1plus: note: set ‘-fconcepts-diagnostics-depth=’ to at least 2 for more detail /usr/include/c++/13/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) { } | ^~~~~~~~~~~~~~~~ /usr/include/c++/13/format:2808:7: note: candidate expects 0 arguments, 1 provided /usr/include/c++/13/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 | ^~~~~~~~~~~~~~~~ /usr/include/c++/13/format:2746:11: note: no known conversion for argument 1 from ‘spdlog::details::dump_info<__gnu_cxx::__normal_iterator<const char*, std::vector<char> > >’ to ‘const std::basic_format_arg<std::basic_format_context<std::__format::_Sink_iter<char>, char> >&’ /usr/include/c++/13/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> >&&)’ /usr/include/c++/13/format:2746:11: note: no known conversion for argument 1 from ‘spdlog::details::dump_info<__gnu_cxx::__normal_iterator<const char*, std::vector<char> > >’ to ‘std::basic_format_arg<std::basic_format_context<std::__format::_Sink_iter<char>, char> >&&’ /usr/include/c++/13/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 = spdlog::details::dump_info<__gnu_cxx::__normal_iterator<char*, std::vector<char> > >; _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]’: /usr/include/c++/13/format:3252:23: required from ‘std::__format::_Arg_store<_Context, _Args>::_Arg_store(_Tp& ...) [with _Tp = {spdlog::details::dump_info<__gnu_cxx::__normal_iterator<char*, std::vector<char, std::allocator<char> > > >}; _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}]’ /usr/include/c++/13/format:3301:14: required from ‘auto std::make_format_args(_Args&& ...) [with _Context = basic_format_context<__format::_Sink_iter<char>, char>; _Args = {spdlog::details::dump_info<__gnu_cxx::__normal_iterator<char*, vector<char, allocator<char> > > >}]’ /home/vagrant/ProjectFiles/codes/orbit/spdlog/include/spdlog/logger.h:372:88: required from ‘void spdlog::logger::log_(spdlog::source_loc, spdlog::level::level_enum, spdlog::string_view_t, Args&& ...) [with Args = {spdlog::details::dump_info<__gnu_cxx::__normal_iterator<char*, std::vector<char, std::allocator<char> > > >}; spdlog::string_view_t = std::basic_string_view<char>]’ /home/vagrant/ProjectFiles/codes/orbit/spdlog/include/spdlog/logger.h:90:13: required from ‘void spdlog::logger::log(spdlog::source_loc, spdlog::level::level_enum, spdlog::format_string_t<Args ...>, Args&& ...) [with Args = {spdlog::details::dump_info<__gnu_cxx::__normal_iterator<char*, std::vector<char, std::allocator<char> > > >}; spdlog::format_string_t<Args ...> = std::basic_string_view<char>]’ /home/vagrant/ProjectFiles/codes/orbit/spdlog/include/spdlog/logger.h:96:12: required from ‘void spdlog::logger::log(spdlog::level::level_enum, spdlog::format_string_t<Args ...>, Args&& ...) [with Args = {spdlog::details::dump_info<__gnu_cxx::__normal_iterator<char*, std::vector<char, std::allocator<char> > > >}; spdlog::format_string_t<Args ...> = std::basic_string_view<char>]’ /home/vagrant/ProjectFiles/codes/orbit/spdlog/include/spdlog/logger.h:158:12: required from ‘void spdlog::logger::info(spdlog::format_string_t<Args ...>, Args&& ...) [with Args = {spdlog::details::dump_info<__gnu_cxx::__normal_iterator<char*, std::vector<char, std::allocator<char> > > >}; spdlog::format_string_t<Args ...> = std::basic_string_view<char>]’ /home/vagrant/ProjectFiles/codes/orbit/spdlog/include/spdlog/spdlog.h:161:31: required from ‘void spdlog::info(format_string_t<Args ...>, Args&& ...)[with Args = {details::dump_info<__gnu_cxx::__normal_iterator<char*, std::vector<char, std::allocator<char> > > >}; format_string_t<Args ...> = std::basic_string_view<char>]’ /home/vagrant/ProjectFiles/codes/orbit/spdlog/example/example.cpp:184:17: required from here /usr/include/c++/13/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(spdlog::details::dump_info<__gnu_cxx::__normal_iterator<char*, std::vector<char> > >&)’ 3241 | basic_format_arg<_Context> __arg(__v); | ^~~~~ /usr/include/c++/13/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 | ^~~~~~~~~~~~~~~~ /usr/include/c++/13/format:2996:9: note: template argument deduction/substitution failed: /usr/include/c++/13/format:2996:9: note: constraints not satisfied /usr/include/c++/13/concepts: 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>]’: /usr/include/c++/13/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 = spdlog::details::dump_info<__gnu_cxx::__normal_iterator<char*, std::vector<char> > >; _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]’ /usr/include/c++/13/format:3252:23: required from ‘std::__format::_Arg_store<_Context, _Args>::_Arg_store(_Tp& ...) [with _Tp = {spdlog::details::dump_info<__gnu_cxx::__normal_iterator<char*, std::vector<char, std::allocator<char> > > >}; _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}]’ /usr/include/c++/13/format:3301:14: required from ‘auto std::make_format_args(_Args&& ...) [with _Context = basic_format_context<__format::_Sink_iter<char>, char>; _Args = {spdlog::details::dump_info<__gnu_cxx::__normal_iterator<char*, vector<char, allocator<char> > > >}]’ /home/vagrant/ProjectFiles/codes/orbit/spdlog/include/spdlog/logger.h:372:88: required from ‘void spdlog::logger::log_(spdlog::source_loc, spdlog::level::level_enum, spdlog::string_view_t, Args&& ...) [with Args = {spdlog::details::dump_info<__gnu_cxx::__normal_iterator<char*, std::vector<char, std::allocator<char> > > >}; spdlog::string_view_t = std::basic_string_view<char>]’ /home/vagrant/ProjectFiles/codes/orbit/spdlog/include/spdlog/logger.h:90:13: required from ‘void spdlog::logger::log(spdlog::source_loc, spdlog::level::level_enum, spdlog::format_string_t<Args ...>, Args&& ...) [with Args = {spdlog::details::dump_info<__gnu_cxx::__normal_iterator<char*, std::vector<char, std::allocator<char> > > >}; spdlog::format_string_t<Args ...> = std::basic_string_view<char>]’ /home/vagrant/ProjectFiles/codes/orbit/spdlog/include/spdlog/logger.h:96:12: required from ‘void spdlog::logger::log(spdlog::level::level_enum, spdlog::format_string_t<Args ...>, Args&& ...) [with Args = {spdlog::details::dump_info<__gnu_cxx::__normal_iterator<char*, std::vector<char, std::allocator<char> > > >}; spdlog::format_string_t<Args ...> = std::basic_string_view<char>]’ /home/vagrant/ProjectFiles/codes/orbit/spdlog/include/spdlog/logger.h:158:12: required from ‘void spdlog::logger::info(spdlog::format_string_t<Args ...>, Args&& ...) [with Args = {spdlog::details::dump_info<__gnu_cxx::__normal_iterator<char*, std::vector<char, std::allocator<char> > > >}; spdlog::format_string_t<Args ...> = std::basic_string_view<char>]’ /home/vagrant/ProjectFiles/codes/orbit/spdlog/include/spdlog/spdlog.h:161:31: required from ‘void spdlog::info(format_string_t<Args ...>, Args&& ...)[with Args = {details::dump_info<__gnu_cxx::__normal_iterator<char*, std::vector<char, std::allocator<char> > > >}; format_string_t<Args ...> = std::basic_string_view<char>]’ /home/vagrant/ProjectFiles/codes/orbit/spdlog/example/example.cpp:184:17: required from here /usr/include/c++/13/concepts:139:13: required for the satisfaction of ‘assignable_from<_Tp&, _Tp>’ [with _Tp = std::formatter<spdlog::details::dump_info<__gnu_cxx::__normal_iterator<char*, std::vector<char, std::allocator<char> > > >, char>] /usr/include/c++/13/concepts:263:13: required for the satisfaction of ‘movable<_Tp>’ [with _Tp = std::formatter<spdlog::details::dump_info<__gnu_cxx::__normal_iterator<char*, std::vector<char, std::allocator<char> > > >, char>] /usr/include/c++/13/concepts:267:13: required for the satisfaction of ‘copyable<_Tp>’ [with _Tp = std::formatter<spdlog::details::dump_info<__gnu_cxx::__normal_iterator<char*, std::vector<char, std::allocator<char> > > >, char>] /usr/include/c++/13/concepts:272:13: required for the satisfaction of ‘semiregular<_Formatter>’ [with _Formatter = std::formatter<spdlog::details::dump_info<__gnu_cxx::__normal_iterator<char*, std::vector<char, std::allocator<char> > > >, char>] /usr/include/c++/13/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 = spdlog::details::dump_info<__gnu_cxx::__normal_iterator<char*, std::vector<char, std::allocator<char> > > >; _Context = std::basic_format_context<std::__format::_Sink_iter<char>, char>] /usr/include/c++/13/concepts:142:10: in requirements with ‘_Lhs __lhs’, ‘_Rhs&& __rhs’ [with _Lhs = std::formatter<spdlog::details::dump_info<__gnu_cxx::__normal_iterator<char*, std::vector<char, std::allocator<char> > > >, char>&; _Rhs = std::formatter<spdlog::details::dump_info<__gnu_cxx::__normal_iterator<char*, std::vector<char, std::allocator<char> > > >, char>] /usr/include/c++/13/concepts:143:17: note: the required expression ‘__lhs = static_cast<_Rhs&&>(__rhs)’ is invalid 143 | { __lhs = static_cast<_Rhs&&>(__rhs) } -> same_as<_Lhs>; | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/13/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 = spdlog::details::dump_info<__gnu_cxx::__normal_iterator<char*, std::vector<char> > >; _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]’: /usr/include/c++/13/format:3252:23: required from ‘std::__format::_Arg_store<_Context, _Args>::_Arg_store(_Tp& ...) [with _Tp = {spdlog::details::dump_info<__gnu_cxx::__normal_iterator<char*, std::vector<char, std::allocator<char> > > >}; _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}]’ /usr/include/c++/13/format:3301:14: required from ‘auto std::make_format_args(_Args&& ...) [with _Context = basic_format_context<__format::_Sink_iter<char>, char>; _Args = {spdlog::details::dump_info<__gnu_cxx::__normal_iterator<char*, vector<char, allocator<char> > > >}]’ /home/vagrant/ProjectFiles/codes/orbit/spdlog/include/spdlog/logger.h:372:88: required from ‘void spdlog::logger::log_(spdlog::source_loc, spdlog::level::level_enum, spdlog::string_view_t, Args&& ...) [with Args = {spdlog::details::dump_info<__gnu_cxx::__normal_iterator<char*, std::vector<char, std::allocator<char> > > >}; spdlog::string_view_t = std::basic_string_view<char>]’ /home/vagrant/ProjectFiles/codes/orbit/spdlog/include/spdlog/logger.h:90:13: required from ‘void spdlog::logger::log(spdlog::source_loc, spdlog::level::level_enum, spdlog::format_string_t<Args ...>, Args&& ...) [with Args = {spdlog::details::dump_info<__gnu_cxx::__normal_iterator<char*, std::vector<char, std::allocator<char> > > >}; spdlog::format_string_t<Args ...> = std::basic_string_view<char>]’ /home/vagrant/ProjectFiles/codes/orbit/spdlog/include/spdlog/logger.h:96:12: required from ‘void spdlog::logger::log(spdlog::level::level_enum, spdlog::format_string_t<Args ...>, Args&& ...) [with Args = {spdlog::details::dump_info<__gnu_cxx::__normal_iterator<char*, std::vector<char, std::allocator<char> > > >}; spdlog::format_string_t<Args ...> = std::basic_string_view<char>]’ /home/vagrant/ProjectFiles/codes/orbit/spdlog/include/spdlog/logger.h:158:12: required from ‘void spdlog::logger::info(spdlog::format_string_t<Args ...>, Args&& ...) [with Args = {spdlog::details::dump_info<__gnu_cxx::__normal_iterator<char*, std::vector<char, std::allocator<char> > > >}; spdlog::format_string_t<Args ...> = std::basic_string_view<char>]’ /home/vagrant/ProjectFiles/codes/orbit/spdlog/include/spdlog/spdlog.h:161:31: required from ‘void spdlog::info(format_string_t<Args ...>, Args&& ...)[with Args = {details::dump_info<__gnu_cxx::__normal_iterator<char*, std::vector<char, std::allocator<char> > > >}; format_string_t<Args ...> = std::basic_string_view<char>]’ /home/vagrant/ProjectFiles/codes/orbit/spdlog/example/example.cpp:184:17: required from here /usr/include/c++/13/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) { } | ^~~~~~~~~~~~~~~~ /usr/include/c++/13/format:2808:7: note: candidate expects 0 arguments, 1 provided /usr/include/c++/13/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 | ^~~~~~~~~~~~~~~~ /usr/include/c++/13/format:2746:11: note: no known conversion for argument 1 from ‘spdlog::details::dump_info<__gnu_cxx::__normal_iterator<char*, std::vector<char> > >’ to ‘const std::basic_format_arg<std::basic_format_context<std::__format::_Sink_iter<char>, char> >&’ /usr/include/c++/13/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> >&&)’ /usr/include/c++/13/format:2746:11: note: no known conversion for argument 1 from ‘spdlog::details::dump_info<__gnu_cxx::__normal_iterator<char*, std::vector<char> > >’ to ‘std::basic_format_arg<std::basic_format_context<std::__format::_Sink_iter<char>, char> >&&’ /usr/include/c++/13/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 = spdlog::stopwatch; _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]’: /usr/include/c++/13/format:3252:23: required from ‘std::__format::_Arg_store<_Context, _Args>::_Arg_store(_Tp& ...) [with _Tp = {spdlog::stopwatch}; _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}]’ /usr/include/c++/13/format:3301:14: required from ‘auto std::make_format_args(_Args&& ...) [with _Context = basic_format_context<__format::_Sink_iter<char>, char>; _Args = {spdlog::stopwatch&}]’ /home/vagrant/ProjectFiles/codes/orbit/spdlog/include/spdlog/logger.h:372:88: required from ‘void spdlog::logger::log_(spdlog::source_loc, spdlog::level::level_enum, spdlog::string_view_t, Args&& ...) [with Args = {spdlog::stopwatch&}; spdlog::string_view_t = std::basic_string_view<char>]’ /home/vagrant/ProjectFiles/codes/orbit/spdlog/include/spdlog/logger.h:90:13: required from ‘void spdlog::logger::log(spdlog::source_loc, spdlog::level::level_enum, spdlog::format_string_t<Args ...>, Args&& ...) [with Args = {spdlog::stopwatch&}; spdlog::format_string_t<Args ...> = std::basic_string_view<char>]’ /home/vagrant/ProjectFiles/codes/orbit/spdlog/include/spdlog/logger.h:96:12: required from ‘void spdlog::logger::log(spdlog::level::level_enum, spdlog::format_string_t<Args ...>, Args&& ...) [with Args = {spdlog::stopwatch&}; spdlog::format_string_t<Args ...> = std::basic_string_view<char>]’ /home/vagrant/ProjectFiles/codes/orbit/spdlog/include/spdlog/logger.h:158:12: required from ‘void spdlog::logger::info(spdlog::format_string_t<Args ...>, Args&& ...) [with Args = {spdlog::stopwatch&}; spdlog::format_string_t<Args ...> = std::basic_string_view<char>]’ /home/vagrant/ProjectFiles/codes/orbit/spdlog/include/spdlog/spdlog.h:161:31: required from ‘void spdlog::info(format_string_t<Args ...>, Args&& ...)[with Args = {stopwatch&}; format_string_t<Args ...> = std::basic_string_view<char>]’ /home/vagrant/ProjectFiles/codes/orbit/spdlog/example/example.cpp:229:17: required from here /usr/include/c++/13/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(spdlog::stopwatch&)’ 3241 | basic_format_arg<_Context> __arg(__v); | ^~~~~ /usr/include/c++/13/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 | ^~~~~~~~~~~~~~~~ /usr/include/c++/13/format:2996:9: note: template argument deduction/substitution failed: /usr/include/c++/13/format:2996:9: note: constraints not satisfied /usr/include/c++/13/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>]’: /usr/include/c++/13/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 = spdlog::stopwatch; _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’ /usr/include/c++/13/format:3252:23: required from ‘std::__format::_Arg_store<_Context, _Args>::_Arg_store(_Tp& ...) [with _Tp = {spdlog::stopwatch}; _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}]’ /usr/include/c++/13/format:3301:14: required from ‘auto std::make_format_args(_Args&& ...) [with _Context = basic_format_context<__format::_Sink_iter<char>, char>; _Args = {spdlog::stopwatch&}]’ /home/vagrant/ProjectFiles/codes/orbit/spdlog/include/spdlog/logger.h:372:88: required from ‘void spdlog::logger::log_(spdlog::source_loc, spdlog::level::level_enum, spdlog::string_view_t, Args&& ...) [with Args = {spdlog::stopwatch&}; spdlog::string_view_t = std::basic_string_view<char>]’ /home/vagrant/ProjectFiles/codes/orbit/spdlog/include/spdlog/logger.h:90:13: required from ‘void spdlog::logger::log(spdlog::source_loc, spdlog::level::level_enum, spdlog::format_string_t<Args ...>, Args&& ...) [with Args = {spdlog::stopwatch&}; spdlog::format_string_t<Args ...> = std::basic_string_view<char>]’ /home/vagrant/ProjectFiles/codes/orbit/spdlog/include/spdlog/logger.h:96:12: required from ‘void spdlog::logger::log(spdlog::level::level_enum, spdlog::format_string_t<Args ...>, Args&& ...) [with Args = {spdlog::stopwatch&}; spdlog::format_string_t<Args ...> = std::basic_string_view<char>]’ /home/vagrant/ProjectFiles/codes/orbit/spdlog/include/spdlog/logger.h:158:12: required from ‘void spdlog::logger::info(spdlog::format_string_t<Args ...>, Args&& ...) [with Args = {spdlog::stopwatch&}; spdlog::format_string_t<Args ...> = std::basic_string_view<char>]’ /home/vagrant/ProjectFiles/codes/orbit/spdlog/include/spdlog/spdlog.h:161:31: required from ‘void spdlog::info(format_string_t<Args ...>, Args&& ...)[with Args = {stopwatch&}; format_string_t<Args ...> = std::basic_string_view<char>]’ /home/vagrant/ProjectFiles/codes/orbit/spdlog/example/example.cpp:229:17: required from here /usr/include/c++/13/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 = spdlog::stopwatch; _Context = std::basic_format_context<std::__format::_Sink_iter<char>, char>] /usr/include/c++/13/format:2199:7: in requirements with ‘const _Formatter __cf’, ‘_Tp&& __t’, ‘_Context __fc’ [with _Formatter = std::formatter<spdlog::stopwatch, char>; _Tp = spdlog::stopwatch; _Context = std::basic_format_context<std::__format::_Sink_iter<char>, char>] /usr/include/c++/13/format:2201:20: note: the required expression ‘__cf.format(__t, __fc)’ is invalid 2201 | { __cf.format(__t, __fc) } -> same_as<typename _Context::iterator>; | ~~~~~~~~~~~^~~~~~~~~~~ /usr/include/c++/13/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 = spdlog::stopwatch; _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]’: /usr/include/c++/13/format:3252:23: required from ‘std::__format::_Arg_store<_Context, _Args>::_Arg_store(_Tp& ...) [with _Tp = {spdlog::stopwatch}; _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}]’ /usr/include/c++/13/format:3301:14: required from ‘auto std::make_format_args(_Args&& ...) [with _Context = basic_format_context<__format::_Sink_iter<char>, char>; _Args = {spdlog::stopwatch&}]’ /home/vagrant/ProjectFiles/codes/orbit/spdlog/include/spdlog/logger.h:372:88: required from ‘void spdlog::logger::log_(spdlog::source_loc, spdlog::level::level_enum, spdlog::string_view_t, Args&& ...) [with Args = {spdlog::stopwatch&}; spdlog::string_view_t = std::basic_string_view<char>]’ /home/vagrant/ProjectFiles/codes/orbit/spdlog/include/spdlog/logger.h:90:13: required from ‘void spdlog::logger::log(spdlog::source_loc, spdlog::level::level_enum, spdlog::format_string_t<Args ...>, Args&& ...) [with Args = {spdlog::stopwatch&}; spdlog::format_string_t<Args ...> = std::basic_string_view<char>]’ /home/vagrant/ProjectFiles/codes/orbit/spdlog/include/spdlog/logger.h:96:12: required from ‘void spdlog::logger::log(spdlog::level::level_enum, spdlog::format_string_t<Args ...>, Args&& ...) [with Args = {spdlog::stopwatch&}; spdlog::format_string_t<Args ...> = std::basic_string_view<char>]’ /home/vagrant/ProjectFiles/codes/orbit/spdlog/include/spdlog/logger.h:158:12: required from ‘void spdlog::logger::info(spdlog::format_string_t<Args ...>, Args&& ...) [with Args = {spdlog::stopwatch&}; spdlog::format_string_t<Args ...> = std::basic_string_view<char>]’ /home/vagrant/ProjectFiles/codes/orbit/spdlog/include/spdlog/spdlog.h:161:31: required from ‘void spdlog::info(format_string_t<Args ...>, Args&& ...)[with Args = {stopwatch&}; format_string_t<Args ...> = std::basic_string_view<char>]’ /home/vagrant/ProjectFiles/codes/orbit/spdlog/example/example.cpp:229:17: required from here /usr/include/c++/13/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) { } | ^~~~~~~~~~~~~~~~ /usr/include/c++/13/format:2808:7: note: candidate expects 0 arguments, 1 provided /usr/include/c++/13/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 | ^~~~~~~~~~~~~~~~ /usr/include/c++/13/format:2746:11: note: no known conversion for argument 1 from ‘spdlog::stopwatch’ to ‘const std::basic_format_arg<std::basic_format_context<std::__format::_Sink_iter<char>, char> >&’ /usr/include/c++/13/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> >&&)’ /usr/include/c++/13/format:2746:11: note: no known conversion for argument 1 from ‘spdlog::stopwatch’ to ‘std::basic_format_arg<std::basic_format_context<std::__format::_Sink_iter<char>, char> >&&’ /usr/include/c++/13/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 = my_type; _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]’: /usr/include/c++/13/format:3252:23: required from ‘std::__format::_Arg_store<_Context, _Args>::_Arg_store(_Tp& ...) [with _Tp = {my_type}; _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}]’ /usr/include/c++/13/format:3301:14: required from ‘auto std::make_format_args(_Args&& ...) [with _Context = basic_format_context<__format::_Sink_iter<char>, char>; _Args = {my_type}]’ /home/vagrant/ProjectFiles/codes/orbit/spdlog/include/spdlog/logger.h:372:88: required from ‘void spdlog::logger::log_(spdlog::source_loc, spdlog::level::level_enum, spdlog::string_view_t, Args&& ...) [with Args = {my_type}; spdlog::string_view_t = std::basic_string_view<char>]’ /home/vagrant/ProjectFiles/codes/orbit/spdlog/include/spdlog/logger.h:90:13: required from ‘void spdlog::logger::log(spdlog::source_loc, spdlog::level::level_enum, spdlog::format_string_t<Args ...>, Args&& ...) [with Args = {my_type}; spdlog::format_string_t<Args ...> = std::basic_string_view<char>]’ /home/vagrant/ProjectFiles/codes/orbit/spdlog/include/spdlog/logger.h:96:12: required from ‘void spdlog::logger::log(spdlog::level::level_enum, spdlog::format_string_t<Args ...>, Args&& ...) [with Args = {my_type}; spdlog::format_string_t<Args ...> = std::basic_string_view<char>]’ /home/vagrant/ProjectFiles/codes/orbit/spdlog/include/spdlog/logger.h:158:12: required from ‘void spdlog::logger::info(spdlog::format_string_t<Args ...>, Args&& ...) [with Args = {my_type}; spdlog::format_string_t<Args ...> = std::basic_string_view<char>]’ /home/vagrant/ProjectFiles/codes/orbit/spdlog/include/spdlog/spdlog.h:161:31: required from ‘void spdlog::info(format_string_t<Args ...>, Args&& ...)[with Args = {my_type}; format_string_t<Args ...> = std::basic_string_view<char>]’ /home/vagrant/ProjectFiles/codes/orbit/spdlog/example/example.cpp:288:17: required from here /usr/include/c++/13/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(my_type&)’ 3241 | basic_format_arg<_Context> __arg(__v); | ^~~~~ /usr/include/c++/13/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 | ^~~~~~~~~~~~~~~~ /usr/include/c++/13/format:2996:9: note: template argument deduction/substitution failed: /usr/include/c++/13/format:2996:9: note: constraints not satisfied /usr/include/c++/13/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>]’: /usr/include/c++/13/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 = my_type; _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]’ /usr/include/c++/13/format:3252:23: required from ‘std::__format::_Arg_store<_Context, _Args>::_Arg_store(_Tp& ...) [with _Tp = {my_type}; _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}]’ /usr/include/c++/13/format:3301:14: required from ‘auto std::make_format_args(_Args&& ...) [with _Context = basic_format_context<__format::_Sink_iter<char>, char>; _Args = {my_type}]’ /home/vagrant/ProjectFiles/codes/orbit/spdlog/include/spdlog/logger.h:372:88: required from ‘void spdlog::logger::log_(spdlog::source_loc, spdlog::level::level_enum, spdlog::string_view_t, Args&& ...) [with Args = {my_type}; spdlog::string_view_t = std::basic_string_view<char>]’ /home/vagrant/ProjectFiles/codes/orbit/spdlog/include/spdlog/logger.h:90:13: required from ‘void spdlog::logger::log(spdlog::source_loc, spdlog::level::level_enum, spdlog::format_string_t<Args ...>, Args&& ...) [with Args = {my_type}; spdlog::format_string_t<Args ...> = std::basic_string_view<char>]’ /home/vagrant/ProjectFiles/codes/orbit/spdlog/include/spdlog/logger.h:96:12: required from ‘void spdlog::logger::log(spdlog::level::level_enum, spdlog::format_string_t<Args ...>, Args&& ...) [with Args = {my_type}; spdlog::format_string_t<Args ...> = std::basic_string_view<char>]’ /home/vagrant/ProjectFiles/codes/orbit/spdlog/include/spdlog/logger.h:158:12: required from ‘void spdlog::logger::info(spdlog::format_string_t<Args ...>, Args&& ...) [with Args = {my_type}; spdlog::format_string_t<Args ...> = std::basic_string_view<char>]’ /home/vagrant/ProjectFiles/codes/orbit/spdlog/include/spdlog/spdlog.h:161:31: required from ‘void spdlog::info(format_string_t<Args ...>, Args&& ...)[with Args = {my_type}; format_string_t<Args ...> = std::basic_string_view<char>]’ /home/vagrant/ProjectFiles/codes/orbit/spdlog/example/example.cpp:288:17: required from here /usr/include/c++/13/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 = my_type; _Context = std::basic_format_context<std::__format::_Sink_iter<char>, char>] /usr/include/c++/13/format:2199:7: in requirements with ‘const _Formatter __cf’, ‘_Tp&& __t’, ‘_Context __fc’ [with _Formatter = std::formatter<my_type, char>; _Tp = my_type; _Context = std::basic_format_context<std::__format::_Sink_iter<char>, char>] /usr/include/c++/13/format:2201:20: note: the required expression ‘__cf.format(__t, __fc)’ is invalid 2201 | { __cf.format(__t, __fc) } -> same_as<typename _Context::iterator>; | ~~~~~~~~~~~^~~~~~~~~~~ /usr/include/c++/13/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 = my_type; _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]’: /usr/include/c++/13/format:3252:23: required from ‘std::__format::_Arg_store<_Context, _Args>::_Arg_store(_Tp& ...) [with _Tp = {my_type}; _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}]’ /usr/include/c++/13/format:3301:14: required from ‘auto std::make_format_args(_Args&& ...) [with _Context = basic_format_context<__format::_Sink_iter<char>, char>; _Args = {my_type}]’ /home/vagrant/ProjectFiles/codes/orbit/spdlog/include/spdlog/logger.h:372:88: required from ‘void spdlog::logger::log_(spdlog::source_loc, spdlog::level::level_enum, spdlog::string_view_t, Args&& ...) [with Args = {my_type}; spdlog::string_view_t = std::basic_string_view<char>]’ /home/vagrant/ProjectFiles/codes/orbit/spdlog/include/spdlog/logger.h:90:13: required from ‘void spdlog::logger::log(spdlog::source_loc, spdlog::level::level_enum, spdlog::format_string_t<Args ...>, Args&& ...) [with Args = {my_type}; spdlog::format_string_t<Args ...> = std::basic_string_view<char>]’ /home/vagrant/ProjectFiles/codes/orbit/spdlog/include/spdlog/logger.h:96:12: required from ‘void spdlog::logger::log(spdlog::level::level_enum, spdlog::format_string_t<Args ...>, Args&& ...) [with Args = {my_type}; spdlog::format_string_t<Args ...> = std::basic_string_view<char>]’ /home/vagrant/ProjectFiles/codes/orbit/spdlog/include/spdlog/logger.h:158:12: required from ‘void spdlog::logger::info(spdlog::format_string_t<Args ...>, Args&& ...) [with Args = {my_type}; spdlog::format_string_t<Args ...> = std::basic_string_view<char>]’ /home/vagrant/ProjectFiles/codes/orbit/spdlog/include/spdlog/spdlog.h:161:31: required from ‘void spdlog::info(format_string_t<Args ...>, Args&& ...)[with Args = {my_type}; format_string_t<Args ...> = std::basic_string_view<char>]’ /home/vagrant/ProjectFiles/codes/orbit/spdlog/example/example.cpp:288:17: required from here /usr/include/c++/13/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) { } | ^~~~~~~~~~~~~~~~ /usr/include/c++/13/format:2808:7: note: candidate expects 0 arguments, 1 provided /usr/include/c++/13/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 | ^~~~~~~~~~~~~~~~ /usr/include/c++/13/format:2746:11: note: no known conversion for argument 1 from ‘my_type’ to ‘const std::basic_format_arg<std::basic_format_context<std::__format::_Sink_iter<char>, char> >&’ /usr/include/c++/13/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> >&&)’ /usr/include/c++/13/format:2746:11: note: no known conversion for argument 1 from ‘my_type’ to ‘std::basic_format_arg<std::basic_format_context<std::__format::_Sink_iter<char>, char> >&&’ make[2]: *** [example/CMakeFiles/example.dir/build.make:76: example/CMakeFiles/example.dir/example.cpp.o] Error 1 make[1]: *** [CMakeFiles/Makefile2:126: example/CMakeFiles/example.dir/all] Error 2 make: *** [Makefile:156: all] Error 2

I think the first error with memset can easily be solved by adding header. But I'm struggling with the other errors that stems from example.cpp

shazni avatar Apr 30 '23 12:04 shazni

Thanks for investigating the error. But, building example.cpp should not be your goal. If your goal is to use the library, you can skip building example.cpp by defining the following CMake variables.

  • SPDLOG_BUILD_EXAMPLE=OFF.
  • SPDLOG_BUILD_EXAMPLE_HO=OFF

Note also that there is a std::format fix that has not been released.

tt4g avatar Apr 30 '23 13:04 tt4g

We have only ever used SPDLOG_USE_STD_FORMAT with the MSVC compiler, so issues with a different compiler are somewhat expected.

A PR to fix this issue would be most welcome.

gabime avatar Apr 30 '23 21:04 gabime

I don't know if that will solve problem. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109688#add_comment

Jamaika1 avatar May 01 '23 20:05 Jamaika1

I saw BugZIlla and it could be a bug in the GCC.

tt4g avatar May 01 '23 21:05 tt4g

@vitaut Any idea how to fix this? Seems the standard doesn't like this line which works perfrectly with fmtlib.

gabime avatar Jul 03 '23 09:07 gabime

@gabime, are you sure that you linked to the correct line? What is the full error message?

vitaut avatar Jul 03 '23 13:07 vitaut

are you sure that you linked to the correct line? What is the full error message?

@vitaut, No, not sure at all, but the comments in the gcc ticket suggests to look at this as possible cause.

To reproduce:


#include "spdlog/spdlog.h"
#include "spdlog/stopwatch.h"

int main (){
    spdlog::stopwatch sw;
    spdlog::info("Stopwatch: {} seconds", sw);
}
cmake -DCMAKE_CXX_STANDARD=20 -DSPDLOG_USE_STD_FORMAT=ON ..
make

And the error is:

[ 88%] Building CXX object example/CMakeFiles/example.dir/example.cpp.o
In file included from /home/gabi/devel/GCC-13.1.0/include/c++/13.1.0/bits/chrono_io.h:39,
                 from /home/gabi/devel/GCC-13.1.0/include/c++/13.1.0/chrono:3330,
                 from /home/gabi/spdlog/include/spdlog/common.h:10,
                 from /home/gabi/spdlog/include/spdlog/spdlog.h:12,
                 from /home/gabi/spdlog/example/example.cpp:8:
/home/gabi/devel/GCC-13.1.0/include/c++/13.1.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 = spdlog::stopwatch; _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]’:
/home/gabi/devel/GCC-13.1.0/include/c++/13.1.0/format:3252:23:   required from ‘std::__format::_Arg_store<_Context, _Args>::_Arg_store(_Tp& ...) [with _Tp = {spdlog::stopwatch}; _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}]’
/home/gabi/devel/GCC-13.1.0/include/c++/13.1.0/format:3301:14:   required from ‘auto std::make_format_args(_Args&& ...) [with _Context = basic_format_context<__format::_Sink_iter<char>, char>; _Args = {spdlog::stopwatch&}]’
/home/gabi/spdlog/include/spdlog/logger.h:372:88:   required from ‘void spdlog::logger::log_(spdlog::source_loc, spdlog::level::level_enum, spdlog::string_view_t, Args&& ...) [with Args = {spdlog::stopwatch&}; spdlog::string_view_t = std::basic_string_view<char>]’
/home/gabi/spdlog/include/spdlog/logger.h:90:13:   required from ‘void spdlog::logger::log(spdlog::source_loc, spdlog::level::level_enum, spdlog::format_string_t<Args ...>, Args&& ...) [with Args = {spdlog::stopwatch&}; spdlog::format_string_t<Args ...> = std::basic_string_view<char>]’
/home/gabi/spdlog/include/spdlog/logger.h:96:12:   required from ‘void spdlog::logger::log(spdlog::level::level_enum, spdlog::format_string_t<Args ...>, Args&& ...) [with Args = {spdlog::stopwatch&}; spdlog::format_string_t<Args ...> = std::basic_string_view<char>]’
/home/gabi/spdlog/include/spdlog/logger.h:158:12:   required from ‘void spdlog::logger::info(spdlog::format_string_t<Args ...>, Args&& ...) [with Args = {spdlog::stopwatch&}; spdlog::format_string_t<Args ...> = std::basic_string_view<char>]’
/home/gabi/spdlog/include/spdlog/spdlog.h:170:31:   required from ‘void spdlog::info(format_string_t<Args ...>, Args&& ...) [with Args = {stopwatch&}; format_string_t<Args ...> = std::basic_string_view<char>]’
/home/gabi/spdlog/example/example.cpp:13:17:   required from here
/home/gabi/devel/GCC-13.1.0/include/c++/13.1.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(spdlog::stopwatch&)’
 3241 |           basic_format_arg<_Context> __arg(__v);
      |                                      ^~~~~
/home/gabi/devel/GCC-13.1.0/include/c++/13.1.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
      |         ^~~~~~~~~~~~~~~~
/home/gabi/devel/GCC-13.1.0/include/c++/13.1.0/format:2996:9: note:   template argument deduction/substitution failed:
/home/gabi/devel/GCC-13.1.0/include/c++/13.1.0/format:2996:9: note: constraints not satisfied
/home/gabi/devel/GCC-13.1.0/include/c++/13.1.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>]’:
/home/gabi/devel/GCC-13.1.0/include/c++/13.1.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 = spdlog::stopwatch; _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]’
/home/gabi/devel/GCC-13.1.0/include/c++/13.1.0/format:3252:23:   required from ‘std::__format::_Arg_store<_Context, _Args>::_Arg_store(_Tp& ...) [with _Tp = {spdlog::stopwatch}; _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}]’
/home/gabi/devel/GCC-13.1.0/include/c++/13.1.0/format:3301:14:   required from ‘auto std::make_format_args(_Args&& ...) [with _Context = basic_format_context<__format::_Sink_iter<char>, char>; _Args = {spdlog::stopwatch&}]’
/home/gabi/spdlog/include/spdlog/logger.h:372:88:   required from ‘void spdlog::logger::log_(spdlog::source_loc, spdlog::level::level_enum, spdlog::string_view_t, Args&& ...) [with Args = {spdlog::stopwatch&}; spdlog::string_view_t = std::basic_string_view<char>]’
/home/gabi/spdlog/include/spdlog/logger.h:90:13:   required from ‘void spdlog::logger::log(spdlog::source_loc, spdlog::level::level_enum, spdlog::format_string_t<Args ...>, Args&& ...) [with Args = {spdlog::stopwatch&}; spdlog::format_string_t<Args ...> = std::basic_string_view<char>]’
/home/gabi/spdlog/include/spdlog/logger.h:96:12:   required from ‘void spdlog::logger::log(spdlog::level::level_enum, spdlog::format_string_t<Args ...>, Args&& ...) [with Args = {spdlog::stopwatch&}; spdlog::format_string_t<Args ...> = std::basic_string_view<char>]’
/home/gabi/spdlog/include/spdlog/logger.h:158:12:   required from ‘void spdlog::logger::info(spdlog::format_string_t<Args ...>, Args&& ...) [with Args = {spdlog::stopwatch&}; spdlog::format_string_t<Args ...> = std::basic_string_view<char>]’
/home/gabi/spdlog/include/spdlog/spdlog.h:170:31:   required from ‘void spdlog::info(format_string_t<Args ...>, Args&& ...) [with Args = {stopwatch&}; format_string_t<Args ...> = std::basic_string_view<char>]’
/home/gabi/spdlog/example/example.cpp:13:17:   required from here
/home/gabi/devel/GCC-13.1.0/include/c++/13.1.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 = spdlog::stopwatch; _Context = std::basic_format_context<std::__format::_Sink_iter<char>, char>]
/home/gabi/devel/GCC-13.1.0/include/c++/13.1.0/format:2199:7:   in requirements with ‘const _Formatter __cf’, ‘_Tp&& __t’, ‘_Context __fc’ [with _Formatter = std::formatter<spdlog::stopwatch, char>; _Tp = spdlog::stopwatch; _Context = std::basic_format_context<std::__format::_Sink_iter<char>, char>]
/home/gabi/devel/GCC-13.1.0/include/c++/13.1.0/format:2201:20: note: the required expression ‘__cf.format(__t, __fc)’ is invalid
 2201 |       { __cf.format(__t, __fc) } -> same_as<typename _Context::iterator>;
      |         ~~~~~~~~~~~^~~~~~~~~~~
/home/gabi/devel/GCC-13.1.0/include/c++/13.1.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 = spdlog::stopwatch; _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]’:
/home/gabi/devel/GCC-13.1.0/include/c++/13.1.0/format:3252:23:   required from ‘std::__format::_Arg_store<_Context, _Args>::_Arg_store(_Tp& ...) [with _Tp = {spdlog::stopwatch}; _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}]’
/home/gabi/devel/GCC-13.1.0/include/c++/13.1.0/format:3301:14:   required from ‘auto std::make_format_args(_Args&& ...) [with _Context = basic_format_context<__format::_Sink_iter<char>, char>; _Args = {spdlog::stopwatch&}]’
/home/gabi/spdlog/include/spdlog/logger.h:372:88:   required from ‘void spdlog::logger::log_(spdlog::source_loc, spdlog::level::level_enum, spdlog::string_view_t, Args&& ...) [with Args = {spdlog::stopwatch&}; spdlog::string_view_t = std::basic_string_view<char>]’
/home/gabi/spdlog/include/spdlog/logger.h:90:13:   required from ‘void spdlog::logger::log(spdlog::source_loc, spdlog::level::level_enum, spdlog::format_string_t<Args ...>, Args&& ...) [with Args = {spdlog::stopwatch&}; spdlog::format_string_t<Args ...> = std::basic_string_view<char>]’
/home/gabi/spdlog/include/spdlog/logger.h:96:12:   required from ‘void spdlog::logger::log(spdlog::level::level_enum, spdlog::format_string_t<Args ...>, Args&& ...) [with Args = {spdlog::stopwatch&}; spdlog::format_string_t<Args ...> = std::basic_string_view<char>]’
/home/gabi/spdlog/include/spdlog/logger.h:158:12:   required from ‘void spdlog::logger::info(spdlog::format_string_t<Args ...>, Args&& ...) [with Args = {spdlog::stopwatch&}; spdlog::format_string_t<Args ...> = std::basic_string_view<char>]’
/home/gabi/spdlog/include/spdlog/spdlog.h:170:31:   required from ‘void spdlog::info(format_string_t<Args ...>, Args&& ...) [with Args = {stopwatch&}; format_string_t<Args ...> = std::basic_string_view<char>]’
/home/gabi/spdlog/example/example.cpp:13:17:   required from here
cc1plus: note: set ‘-fconcepts-diagnostics-depth=’ to at least 2 for more detail
/home/gabi/devel/GCC-13.1.0/include/c++/13.1.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) { }
      |       ^~~~~~~~~~~~~~~~
/home/gabi/devel/GCC-13.1.0/include/c++/13.1.0/format:2808:7: note:   candidate expects 0 arguments, 1 provided
/home/gabi/devel/GCC-13.1.0/include/c++/13.1.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
      |           ^~~~~~~~~~~~~~~~
/home/gabi/devel/GCC-13.1.0/include/c++/13.1.0/format:2746:11: note:   no known conversion for argument 1 from ‘spdlog::stopwatch’ to ‘const std::basic_format_arg<std::basic_format_context<std::__format::_Sink_iter<char>, char> >&’
/home/gabi/devel/GCC-13.1.0/include/c++/13.1.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> >&&)’
/home/gabi/devel/GCC-13.1.0/include/c++/13.1.0/format:2746:11: note:   no known conversion for argument 1 from ‘spdlog::stopwatch’ to ‘std::basic_format_arg<std::basic_format_context<std::__format::_Sink_iter<char>, char> >&&’
make[2]: *** [example/CMakeFiles/example.dir/build.make:76: example/CMakeFiles/example.dir/example.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:126: example/CMakeFiles/example.dir/all] Error 2

gabime avatar Jul 03 '23 16:07 gabime

It seems to me that the error is caused by missing std::formatter for spdlog::stopwatch.

vitaut avatar Jul 04 '23 14:07 vitaut

I found the cause. format(..) should be declared const. Fixed in 3cd06a3d40cd9054cbc997fe6e28c5a472b93b8c.

Now I am getting similiar error for the bin_to_hex code, but adding const doesnt help here :(

gabime avatar Jul 04 '23 14:07 gabime

I don't see anything obviously wrong in the dump_info formatter other than unnecessary template parametrization on Container which is unlikely to cause problems.

vitaut avatar Jul 04 '23 15:07 vitaut

Fixed build by removing bin_to_hex usage from the example and tests when using std::format (except for msvc which works fine).

Seems that support bin_to_hex with std::format will have to wait for next versions of gcc/clang with better support for user defined types.

gabime avatar Jul 08 '23 14:07 gabime