File tree 2 files changed +10
-6
lines changed
2 files changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -1505,12 +1505,14 @@ template <typename Context> struct arg_mapper {
1505
1505
return {};
1506
1506
}
1507
1507
1508
+ // is_fundamental is used to allow formatters for extended FP types.
1508
1509
template <typename T, typename U = remove_const_t <T>,
1509
- FMT_ENABLE_IF ((std::is_class<U>::value || std::is_enum<U>::value ||
1510
- std::is_union<U>::value) &&
1511
- !has_to_string_view<U>::value && !is_char<U>::value &&
1512
- !is_named_arg<U>::value &&
1513
- !std::is_arithmetic<format_as_t <U>>::value)>
1510
+ FMT_ENABLE_IF (
1511
+ (std::is_class<U>::value || std::is_enum<U>::value ||
1512
+ std::is_union<U>::value || std::is_fundamental<U>::value) &&
1513
+ !has_to_string_view<U>::value && !is_char<U>::value &&
1514
+ !is_named_arg<U>::value && !std::is_integral<U>::value &&
1515
+ !std::is_arithmetic<format_as_t <U>>::value)>
1514
1516
FMT_MAP_API auto map (T& val) -> decltype(FMT_DECLTYPE_THIS do_map (val)) {
1515
1517
return do_map (val);
1516
1518
}
Original file line number Diff line number Diff line change @@ -3716,7 +3716,9 @@ FMT_CONSTEXPR auto write(OutputIt out, const T& value) -> enable_if_t<
3716
3716
template <typename Char, typename OutputIt, typename T,
3717
3717
typename Context = basic_format_context<OutputIt, Char>>
3718
3718
FMT_CONSTEXPR auto write (OutputIt out, const T& value)
3719
- -> enable_if_t<mapped_type_constant<T, Context>::value == type::custom_type,
3719
+ -> enable_if_t<mapped_type_constant<T, Context>::value ==
3720
+ type::custom_type &&
3721
+ !std::is_fundamental<T>::value,
3720
3722
OutputIt> {
3721
3723
auto formatter = typename Context::template formatter_type<T>();
3722
3724
auto parse_ctx = typename Context::parse_context_type ({});
You can’t perform that action at this time.
0 commit comments