Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Can't compile with fmt v11.0.2 #602

Open
nebkat opened this issue Aug 15, 2024 · 2 comments
Open

Can't compile with fmt v11.0.2 #602

nebkat opened this issue Aug 15, 2024 · 2 comments

Comments

@nebkat
Copy link
Contributor

nebkat commented Aug 15, 2024

Getting these errors since upgrading to fmtlib v11.0.2.

In file included from /proj/main.hpp:6,
                 from /proj/main.cpp:3:
/proj/mp-units/src/core/include/mp-units/format.h: In instantiation of 'decltype (ctx.out()) formatter<T, Char>::format(const U&, FormatContext&) const [with FormatContext = fmt::v11::context; U = mp_units::si::degree_Celsius; Char = char; decltype (ctx.out()) = fmt::v11::basic_appender<char>]':
/proj/fmt/include/fmt/base.h:1402:29:   required from 'static void fmt::v11::detail::value<Context>::format_custom_arg(void*, typename Context::parse_context_type&, Context&) [with T = mp_units::si::degree_Celsius; Formatter = fmt::v11::formatter<mp_units::si::degree_Celsius, char, void>; Context = fmt::v11::context; typename Context::parse_context_type = fmt::v11::basic_format_parse_context<char>]'
/proj/fmt/include/fmt/base.h:1383:19:   required from 'constexpr fmt::v11::detail::value<Context>::value(T&) [with T = const mp_units::si::degree_Celsius; Context = fmt::v11::context]'
/proj/mp-units/src/core/include/mp-units/format.h:453:3:   required from 'OutputIt fmt::v11::formatter<mp_units::quantity<R, Rep>, Char>::format_quantity(OutputIt, const quantity_t&, FormatContext&) const [with OutputIt = fmt::v11::basic_appender<char>; FormatContext = fmt::v11::context; auto Reference = mp_units::si::degree_Celsius(); Rep = float; Char = char; quantity_t = mp_units::quantity<mp_units::si::degree_Celsius(), float>]'
/proj/mp-units/src/core/include/mp-units/format.h:478:22:   required from 'auto fmt::v11::formatter<mp_units::quantity<R, Rep>, Char>::format(const quantity_t&, FormatContext&) const [with FormatContext = fmt::v11::context; auto Reference = mp_units::si::degree_Celsius(); Rep = float; Char = char; quantity_t = mp_units::quantity<mp_units::si::degree_Celsius(), float>]'
/proj/fmt/include/fmt/base.h:1224:70:   [ skipping 2 instantiation contexts, use -ftemplate-backtrace-limit=0 to disable ]
/proj/fmt/include/fmt/base.h:1523:69:   required from 'struct fmt::v11::detail::arg_mapper<fmt::v11::context>::formattable<const mp_units::quantity<mp_units::si::degree_Celsius(), float>, mp_units::quantity<mp_units::si::degree_Celsius(), float> >'
/proj/fmt/include/fmt/base.h:1531:25:   required by substitution of 'template<class T, typename std::enable_if<(! fmt::v11::detail::arg_mapper<fmt::v11::context>::formattable<T, typename std::remove_const<_Tp>::type>::value), int>::type <anonymous> > constexpr fmt::v11::detail::unformattable fmt::v11::detail::arg_mapper<fmt::v11::context>::do_map(T&) [with T = const mp_units::quantity<mp_units::si::degree_Celsius(), float>; typename std::enable_if<(! fmt::v11::detail::arg_mapper<fmt::v11::context>::formattable<T, typename std::remove_const<_Tp>::type>::value), int>::type <anonymous> = <missing>]'
/proj/fmt/include/fmt/base.h:1544:68:   required by substitution of 'template<class T, class U, typename std::enable_if<((((((((std::is_class<U>::value || std::is_enum<_Tp2>::value) || std::is_union<U>::value) || std::is_fundamental<U>::value) && (! fmt::v11::detail::has_to_string_view<U, void>::value)) && (! fmt::v11::is_char<U>::value)) && (! fmt::v11::detail::is_named_arg<T>::value)) && (! std::is_integral<_Size>::value)) && (! std::is_arithmetic<typename fmt::v11::detail::format_as_result<U>::type>::value)), int>::type <anonymous> > constexpr decltype (((fmt::v11::detail::arg_mapper<fmt::v11::context>*)this)->fmt::v11::detail::arg_mapper<fmt::v11::context>::do_map(val)) fmt::v11::detail::arg_mapper<fmt::v11::context>::map(T&) [with T = const mp_units::quantity<mp_units::si::degree_Celsius(), float>; U = mp_units::quantity<mp_units::si::degree_Celsius(), float>; typename std::enable_if<((((((((std::is_class<U>::value || std::is_enum<_Tp2>::value) || std::is_union<U>::value) || std::is_fundamental<U>::value) && (! fmt::v11::detail::has_to_string_view<U, void>::value)) && (! fmt::v11::is_char<U>::value)) && (! fmt::v11::detail::is_named_arg<T>::value)) && (! std::is_integral<_Size>::value)) && (! std::is_arithmetic<typename fmt::v11::detail::format_as_result<U>::type>::value)), int>::type <anonymous> = 0]'
/proj/fmt/include/fmt/base.h:1560:53:   required by substitution of 'template<class T, class Context> using fmt::v11::detail::mapped_type_constant = fmt::v11::detail::type_constant<decltype (fmt::v11::detail::arg_mapper<Context>().map(declval<const T&>())), typename Context::char_type> [with T = mp_units::quantity<mp_units::si::degree_Celsius(), float>; Context = fmt::v11::context]'
/proj/fmt/include/fmt/base.h:2733:68:   required from 'constexpr fmt::v11::detail::format_string_checker<Char, Args>::format_string_checker(fmt::v11::basic_string_view<Char>) [with Char = char; Args = {char*, const char*, mp_units::quantity<mp_units::si::degree_Celsius(), float>}]'
/proj/main.cpp:14:5:   required from here
/proj/mp-units/src/core/include/mp-units/format.h:247:44: error: no matching function for call to 'unit_symbol_to<char>(fmt::v11::context::iterator, const mp_units::si::degree_Celsius&, fmt::v11::formatter<mp_units::si::degree_Celsius, char, void>::format_specs&)'
  247 |       return mp_units::unit_symbol_to<Char>(ctx.out(), u, specs);
      |              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
In file included from /proj/mp-units/src/core/include/mp-units/bits/sudo_cast.h:29,
                 from /proj/mp-units/src/core/include/mp-units/framework/quantity.h:28,
                 from /proj/mp-units/src/systems/include/mp-units/systems/isq/base_quantities.h:29,
                 from /proj/mp-units/src/systems/include/mp-units/systems/isq/si_quantities.h:28,
                 from /proj/mp-units/src/systems/include/mp-units/systems/isq/atomic_and_nuclear_physics.h:28,
                 from /proj/mp-units/src/systems/include/mp-units/systems/isq.h:26,
                 from /proj/main.hpp:4:
/proj/mp-units/src/core/include/mp-units/framework/unit.h:807:15: note: candidate: 'template<class CharT, class Out, class U>  requires (output_iterator<Out, CharT>) && (Unit<U>) constexpr Out mp_units::unit_symbol_to(Out, U, const unit_symbol_formatting&)'
  807 | constexpr Out unit_symbol_to(Out out, U u, const unit_symbol_formatting& fmt = unit_symbol_formatting{})
      |               ^~~~~~~~~~~~~~
/proj/mp-units/src/core/include/mp-units/framework/unit.h:807:15: note:   template argument deduction/substitution failed:
/proj/mp-units/src/core/include/mp-units/framework/unit.h:807:15: note: constraints not satisfied
In file included from /home/runner/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20240530/xtensa-esp-elf/xtensa-esp-elf/include/c++/13.2.0/bits/stl_iterator_base_types.h:71,
                 from /home/runner/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20240530/xtensa-esp-elf/xtensa-esp-elf/include/c++/13.2.0/bits/stl_algobase.h:65,
                 from /home/runner/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20240530/xtensa-esp-elf/xtensa-esp-elf/include/c++/13.2.0/bits/specfun.h:43,
                 from /home/runner/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20240530/xtensa-esp-elf/xtensa-esp-elf/include/c++/13.2.0/cmath:3699,
                 from /proj/fmt/include/fmt/format.h:44,
                 from /proj/troo-idf-cxx/common/include/common/fmt_log.hpp:4,
                 from /proj/main.cpp:1:
/home/runner/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20240530/xtensa-esp-elf/xtensa-esp-elf/include/c++/13.2.0/bits/iterator_concepts.h: In substitution of 'template<class CharT, class Out, class U>  requires (output_iterator<Out, CharT>) && (Unit<U>) constexpr Out mp_units::unit_symbol_to(Out, U, const unit_symbol_formatting&) [with CharT = char; Out = fmt::v11::basic_appender<char>; U = mp_units::si::degree_Celsius]':
/proj/mp-units/src/core/include/mp-units/format.h:247:44:   required from 'decltype (ctx.out()) formatter<T, Char>::format(const U&, FormatContext&) const [with FormatContext = fmt::v11::context; U = mp_units::si::degree_Celsius; Char = char; decltype (ctx.out()) = fmt::v11::basic_appender<char>]'
/proj/fmt/include/fmt/base.h:1402:29:   required from 'static void fmt::v11::detail::value<Context>::format_custom_arg(void*, typename Context::parse_context_type&, Context&) [with T = mp_units::si::degree_Celsius; Formatter = fmt::v11::formatter<mp_units::si::degree_Celsius, char, void>; Context = fmt::v11::context; typename Context::parse_context_type = fmt::v11::basic_format_parse_context<char>]'
/proj/fmt/include/fmt/base.h:1383:19:   required from 'constexpr fmt::v11::detail::value<Context>::value(T&) [with T = const mp_units::si::degree_Celsius; Context = fmt::v11::context]'
/proj/mp-units/src/core/include/mp-units/format.h:453:3:   required from 'OutputIt fmt::v11::formatter<mp_units::quantity<R, Rep>, Char>::format_quantity(OutputIt, const quantity_t&, FormatContext&) const [with OutputIt = fmt::v11::basic_appender<char>; FormatContext = fmt::v11::context; auto Reference = mp_units::si::degree_Celsius(); Rep = float; Char = char; quantity_t = mp_units::quantity<mp_units::si::degree_Celsius(), float>]'
/proj/mp-units/src/core/include/mp-units/format.h:478:22:   required from 'auto fmt::v11::formatter<mp_units::quantity<R, Rep>, Char>::format(const quantity_t&, FormatContext&) const [with FormatContext = fmt::v11::context; auto Reference = mp_units::si::degree_Celsius(); Rep = float; Char = char; quantity_t = mp_units::quantity<mp_units::si::degree_Celsius(), float>]'
/proj/fmt/include/fmt/base.h:1224:70:   [ skipping 2 instantiation contexts, use -ftemplate-backtrace-limit=0 to disable ]
/proj/fmt/include/fmt/base.h:1523:69:   required from 'struct fmt::v11::detail::arg_mapper<fmt::v11::context>::formattable<const mp_units::quantity<mp_units::si::degree_Celsius(), float>, mp_units::quantity<mp_units::si::degree_Celsius(), float> >'
/proj/fmt/include/fmt/base.h:1531:25:   required by substitution of 'template<class T, typename std::enable_if<(! fmt::v11::detail::arg_mapper<fmt::v11::context>::formattable<T, typename std::remove_const<_Tp>::type>::value), int>::type <anonymous> > constexpr fmt::v11::detail::unformattable fmt::v11::detail::arg_mapper<fmt::v11::context>::do_map(T&) [with T = const mp_units::quantity<mp_units::si::degree_Celsius(), float>; typename std::enable_if<(! fmt::v11::detail::arg_mapper<fmt::v11::context>::formattable<T, typename std::remove_const<_Tp>::type>::value), int>::type <anonymous> = <missing>]'
/proj/fmt/include/fmt/base.h:1544:68:   required by substitution of 'template<class T, class U, typename std::enable_if<((((((((std::is_class<U>::value || std::is_enum<_Tp2>::value) || std::is_union<U>::value) || std::is_fundamental<U>::value) && (! fmt::v11::detail::has_to_string_view<U, void>::value)) && (! fmt::v11::is_char<U>::value)) && (! fmt::v11::detail::is_named_arg<T>::value)) && (! std::is_integral<_Size>::value)) && (! std::is_arithmetic<typename fmt::v11::detail::format_as_result<U>::type>::value)), int>::type <anonymous> > constexpr decltype (((fmt::v11::detail::arg_mapper<fmt::v11::context>*)this)->fmt::v11::detail::arg_mapper<fmt::v11::context>::do_map(val)) fmt::v11::detail::arg_mapper<fmt::v11::context>::map(T&) [with T = const mp_units::quantity<mp_units::si::degree_Celsius(), float>; U = mp_units::quantity<mp_units::si::degree_Celsius(), float>; typename std::enable_if<((((((((std::is_class<U>::value || std::is_enum<_Tp2>::value) || std::is_union<U>::value) || std::is_fundamental<U>::value) && (! fmt::v11::detail::has_to_string_view<U, void>::value)) && (! fmt::v11::is_char<U>::value)) && (! fmt::v11::detail::is_named_arg<T>::value)) && (! std::is_integral<_Size>::value)) && (! std::is_arithmetic<typename fmt::v11::detail::format_as_result<U>::type>::value)), int>::type <anonymous> = 0]'
/proj/fmt/include/fmt/base.h:1560:53:   required by substitution of 'template<class T, class Context> using fmt::v11::detail::mapped_type_constant = fmt::v11::detail::type_constant<decltype (fmt::v11::detail::arg_mapper<Context>().map(declval<const T&>())), typename Context::char_type> [with T = mp_units::quantity<mp_units::si::degree_Celsius(), float>; Context = fmt::v11::context]'
/proj/fmt/include/fmt/base.h:2733:68:   required from 'constexpr fmt::v11::detail::format_string_checker<Char, Args>::format_string_checker(fmt::v11::basic_string_view<Char>) [with Char = char; Args = {char*, const char*, mp_units::quantity<mp_units::si::degree_Celsius(), float>}]'
/proj/main.cpp:14:5:   required from here
/home/runner/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20240530/xtensa-esp-elf/xtensa-esp-elf/include/c++/13.2.0/bits/iterator_concepts.h:620:13:   required for the satisfaction of 'weakly_incrementable<_Iter>' [with _Iter = fmt::v11::basic_appender<char>]
/home/runner/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20240530/xtensa-esp-elf/xtensa-esp-elf/include/c++/13.2.0/bits/iterator_concepts.h:634:13:   required for the satisfaction of 'input_or_output_iterator<_Iter>' [with _Iter = fmt::v11::basic_appender<char>]
/home/runner/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20240530/xtensa-esp-elf/xtensa-esp-elf/include/c++/13.2.0/bits/iterator_concepts.h:662:13:   required for the satisfaction of 'output_iterator<Out, CharT>' [with Out = fmt::v11::basic_appender<char>; CharT = char]
/home/runner/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20240530/xtensa-esp-elf/xtensa-esp-elf/include/c++/13.2.0/bits/iterator_concepts.h:621:10:   in requirements with '_Iter __i' [with _Iter = fmt::v11::basic_appender<char>]
/home/runner/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20240530/xtensa-esp-elf/xtensa-esp-elf/include/c++/13.2.0/bits/iterator_concepts.h:623:18: note: the required type 'std::iter_difference_t<_Iter>' is invalid
  623 |         typename iter_difference_t<_Iter>;
      |         ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
/home/runner/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20240530/xtensa-esp-elf/xtensa-esp-elf/include/c++/13.2.0/bits/iterator_concepts.h:624:18: note: nested requirement '__is_signed_integer_like<typename std::__detail::__iter_traits_impl<typename std::remove_cvref<_Tp>::type, std::incrementable_traits<typename std::remove_cvref<_Tp>::type> >::type::difference_type>' is not satisfied
  624 |         requires __detail::__is_signed_integer_like<iter_difference_t<_Iter>>;
      |         ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/proj/mp-units/src/core/include/mp-units/format.h: In instantiation of 'decltype (ctx.out()) formatter<T, Char>::format(const U&, FormatContext&) const [with FormatContext = fmt::v11::context; U = mp_units::si::degree_Celsius; Char = char; decltype (ctx.out()) = fmt::v11::basic_appender<char>]':
/proj/fmt/include/fmt/base.h:1402:29:   required from 'static void fmt::v11::detail::value<Context>::format_custom_arg(void*, typename Context::parse_context_type&, Context&) [with T = mp_units::si::degree_Celsius; Formatter = fmt::v11::formatter<mp_units::si::degree_Celsius, char, void>; Context = fmt::v11::context; typename Context::parse_context_type = fmt::v11::basic_format_parse_context<char>]'
/proj/fmt/include/fmt/base.h:1383:19:   required from 'constexpr fmt::v11::detail::value<Context>::value(T&) [with T = const mp_units::si::degree_Celsius; Context = fmt::v11::context]'
/proj/mp-units/src/core/include/mp-units/format.h:453:3:   required from 'OutputIt fmt::v11::formatter<mp_units::quantity<R, Rep>, Char>::format_quantity(OutputIt, const quantity_t&, FormatContext&) const [with OutputIt = fmt::v11::basic_appender<char>; FormatContext = fmt::v11::context; auto Reference = mp_units::si::degree_Celsius(); Rep = float; Char = char; quantity_t = mp_units::quantity<mp_units::si::degree_Celsius(), float>]'
/proj/mp-units/src/core/include/mp-units/format.h:478:22:   required from 'auto fmt::v11::formatter<mp_units::quantity<R, Rep>, Char>::format(const quantity_t&, FormatContext&) const [with FormatContext = fmt::v11::context; auto Reference = mp_units::si::degree_Celsius(); Rep = float; Char = char; quantity_t = mp_units::quantity<mp_units::si::degree_Celsius(), float>]'
/proj/fmt/include/fmt/base.h:1224:70:   [ skipping 2 instantiation contexts, use -ftemplate-backtrace-limit=0 to disable ]
/proj/fmt/include/fmt/base.h:1523:69:   required from 'struct fmt::v11::detail::arg_mapper<fmt::v11::context>::formattable<const mp_units::quantity<mp_units::si::degree_Celsius(), float>, mp_units::quantity<mp_units::si::degree_Celsius(), float> >'
/proj/fmt/include/fmt/base.h:1531:25:   required by substitution of 'template<class T, typename std::enable_if<(! fmt::v11::detail::arg_mapper<fmt::v11::context>::formattable<T, typename std::remove_const<_Tp>::type>::value), int>::type <anonymous> > constexpr fmt::v11::detail::unformattable fmt::v11::detail::arg_mapper<fmt::v11::context>::do_map(T&) [with T = const mp_units::quantity<mp_units::si::degree_Celsius(), float>; typename std::enable_if<(! fmt::v11::detail::arg_mapper<fmt::v11::context>::formattable<T, typename std::remove_const<_Tp>::type>::value), int>::type <anonymous> = <missing>]'
/proj/fmt/include/fmt/base.h:1544:68:   required by substitution of 'template<class T, class U, typename std::enable_if<((((((((std::is_class<U>::value || std::is_enum<_Tp2>::value) || std::is_union<U>::value) || std::is_fundamental<U>::value) && (! fmt::v11::detail::has_to_string_view<U, void>::value)) && (! fmt::v11::is_char<U>::value)) && (! fmt::v11::detail::is_named_arg<T>::value)) && (! std::is_integral<_Size>::value)) && (! std::is_arithmetic<typename fmt::v11::detail::format_as_result<U>::type>::value)), int>::type <anonymous> > constexpr decltype (((fmt::v11::detail::arg_mapper<fmt::v11::context>*)this)->fmt::v11::detail::arg_mapper<fmt::v11::context>::do_map(val)) fmt::v11::detail::arg_mapper<fmt::v11::context>::map(T&) [with T = const mp_units::quantity<mp_units::si::degree_Celsius(), float>; U = mp_units::quantity<mp_units::si::degree_Celsius(), float>; typename std::enable_if<((((((((std::is_class<U>::value || std::is_enum<_Tp2>::value) || std::is_union<U>::value) || std::is_fundamental<U>::value) && (! fmt::v11::detail::has_to_string_view<U, void>::value)) && (! fmt::v11::is_char<U>::value)) && (! fmt::v11::detail::is_named_arg<T>::value)) && (! std::is_integral<_Size>::value)) && (! std::is_arithmetic<typename fmt::v11::detail::format_as_result<U>::type>::value)), int>::type <anonymous> = 0]'
/proj/fmt/include/fmt/base.h:1560:53:   required by substitution of 'template<class T, class Context> using fmt::v11::detail::mapped_type_constant = fmt::v11::detail::type_constant<decltype (fmt::v11::detail::arg_mapper<Context>().map(declval<const T&>())), typename Context::char_type> [with T = mp_units::quantity<mp_units::si::degree_Celsius(), float>; Context = fmt::v11::context]'
/proj/fmt/include/fmt/base.h:2733:68:   required from 'constexpr fmt::v11::detail::format_string_checker<Char, Args>::format_string_checker(fmt::v11::basic_string_view<Char>) [with Char = char; Args = {char*, const char*, mp_units::quantity<mp_units::si::degree_Celsius(), float>}]'
/proj/main.cpp:14:5:   required from here
cc1plus: note: set '-fconcepts-diagnostics-depth=' to at least 2 for more detail
/proj/mp-units/src/core/include/mp-units/format.h: In instantiation of 'decltype (ctx.out()) formatter<T, Char>::format(const U&, FormatContext&) const [with FormatContext = fmt::v11::context; U = mp_units::si::pico_<mp_units::si::farad>; Char = char; decltype (ctx.out()) = fmt::v11::basic_appender<char>]':
/proj/fmt/include/fmt/base.h:1402:29:   required from 'static void fmt::v11::detail::value<Context>::format_custom_arg(void*, typename Context::parse_context_type&, Context&) [with T = mp_units::si::pico_<mp_units::si::farad>; Formatter = fmt::v11::formatter<mp_units::si::pico_<mp_units::si::farad>, char, void>; Context = fmt::v11::context; typename Context::parse_context_type = fmt::v11::basic_format_parse_context<char>]'
/proj/fmt/include/fmt/base.h:1383:19:   required from 'constexpr fmt::v11::detail::value<Context>::value(T&) [with T = const mp_units::si::pico_<mp_units::si::farad>; Context = fmt::v11::context]'
/proj/mp-units/src/core/include/mp-units/format.h:453:3:   required from 'OutputIt fmt::v11::formatter<mp_units::quantity<R, Rep>, Char>::format_quantity(OutputIt, const quantity_t&, FormatContext&) const [with OutputIt = fmt::v11::basic_appender<char>; FormatContext = fmt::v11::context; auto Reference = mp_units::si::pico_<mp_units::si::farad>(); Rep = float; Char = char; quantity_t = mp_units::quantity<mp_units::si::pico_<mp_units::si::farad>(), float>]'
/proj/mp-units/src/core/include/mp-units/format.h:478:22:   required from 'auto fmt::v11::formatter<mp_units::quantity<R, Rep>, Char>::format(const quantity_t&, FormatContext&) const [with FormatContext = fmt::v11::context; auto Reference = mp_units::si::pico_<mp_units::si::farad>(); Rep = float; Char = char; quantity_t = mp_units::quantity<mp_units::si::pico_<mp_units::si::farad>(), float>]'
/proj/fmt/include/fmt/base.h:1224:70:   [ skipping 2 instantiation contexts, use -ftemplate-backtrace-limit=0 to disable ]
/proj/fmt/include/fmt/base.h:1523:69:   required from 'struct fmt::v11::detail::arg_mapper<fmt::v11::context>::formattable<const mp_units::quantity<mp_units::si::pico_<mp_units::si::farad>(), float>, mp_units::quantity<mp_units::si::pico_<mp_units::si::farad>(), float> >'
/proj/fmt/include/fmt/base.h:1531:25:   required by substitution of 'template<class T, typename std::enable_if<(! fmt::v11::detail::arg_mapper<fmt::v11::context>::formattable<T, typename std::remove_const<_Tp>::type>::value), int>::type <anonymous> > constexpr fmt::v11::detail::unformattable fmt::v11::detail::arg_mapper<fmt::v11::context>::do_map(T&) [with T = const mp_units::quantity<mp_units::si::pico_<mp_units::si::farad>(), float>; typename std::enable_if<(! fmt::v11::detail::arg_mapper<fmt::v11::context>::formattable<T, typename std::remove_const<_Tp>::type>::value), int>::type <anonymous> = <missing>]'
/proj/fmt/include/fmt/base.h:1544:68:   required by substitution of 'template<class T, class U, typename std::enable_if<((((((((std::is_class<U>::value || std::is_enum<_Tp2>::value) || std::is_union<U>::value) || std::is_fundamental<U>::value) && (! fmt::v11::detail::has_to_string_view<U, void>::value)) && (! fmt::v11::is_char<U>::value)) && (! fmt::v11::detail::is_named_arg<T>::value)) && (! std::is_integral<_Size>::value)) && (! std::is_arithmetic<typename fmt::v11::detail::format_as_result<U>::type>::value)), int>::type <anonymous> > constexpr decltype (((fmt::v11::detail::arg_mapper<fmt::v11::context>*)this)->fmt::v11::detail::arg_mapper<fmt::v11::context>::do_map(val)) fmt::v11::detail::arg_mapper<fmt::v11::context>::map(T&) [with T = const mp_units::quantity<mp_units::si::pico_<mp_units::si::farad>(), float>; U = mp_units::quantity<mp_units::si::pico_<mp_units::si::farad>(), float>; typename std::enable_if<((((((((std::is_class<U>::value || std::is_enum<_Tp2>::value) || std::is_union<U>::value) || std::is_fundamental<U>::value) && (! fmt::v11::detail::has_to_string_view<U, void>::value)) && (! fmt::v11::is_char<U>::value)) && (! fmt::v11::detail::is_named_arg<T>::value)) && (! std::is_integral<_Size>::value)) && (! std::is_arithmetic<typename fmt::v11::detail::format_as_result<U>::type>::value)), int>::type <anonymous> = 0]'
/proj/fmt/include/fmt/base.h:1560:53:   required by substitution of 'template<class T, class Context> using fmt::v11::detail::mapped_type_constant = fmt::v11::detail::type_constant<decltype (fmt::v11::detail::arg_mapper<Context>().map(declval<const T&>())), typename Context::char_type> [with T = mp_units::quantity<mp_units::si::pico_<mp_units::si::farad>(), float>; Context = fmt::v11::context]'
/proj/fmt/include/fmt/base.h:2733:68:   required from 'constexpr fmt::v11::detail::format_string_checker<Char, Args>::format_string_checker(fmt::v11::basic_string_view<Char>) [with Char = char; Args = {char*, const char*, mp_units::quantity<mp_units::si::pico_<mp_units::si::farad>(), float>, mp_units::quantity<mp_units::si::pico_<mp_units::si::farad>(), float>}]'

Not sure if related:
Compiler explorer fmt v11.0.0
Compiler explorer fmt trunk

libc++abi: terminating due to uncaught exception of type fmt::v11::format_error: width/precision is not integer
Program terminated with signal: SIGSEGV
@mpusz
Copy link
Owner

mpusz commented Aug 20, 2024

It seems that the fmt::basic_appender<char> does not satisfy input_or_output_iterator on fmt 11.0.2.

Could you please check if it reproduces with the latest fmt version? I could not reproduce it for the fmt master version on the Compiler Explorer (https://godbolt.org/z/beGoznE1P).

@lbonn
Copy link

lbonn commented Sep 6, 2024

It has since be fixed in fmtlib/fmt#4093.
On the other side, mp-units 2.2.1 needs this backport 0ac6a17

Next releases of fmt and mp-units should be compatible hopefully :)

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

No branches or pull requests

3 participants