fmt icon indicating copy to clipboard operation
fmt copied to clipboard

Cannot suppress range formatter when type has a container_type member type.

Open hartib opened this issue 6 months ago • 4 comments

The enabling condition of the adaptor formatter around line 838 of ranges.h is:

enable_if_t<conjunction<detail::is_container_adaptor_like<T>,
                        bool_constant<range_format_kind<T, Char>::value ==
                                      range_format::disabled>>::value>>

This is probably supposed to be:

enable_if_t<conjunction<detail::is_container_adaptor_like<T>,
                        bool_constant<range_format_kind<T, Char>::value !=
                                      range_format::disabled>>::value>>

So that the formatter may be disabled via a is_range specialization.

See compilation error in https://godbolt.org/z/Kq33exr6x

hartib avatar Aug 16 '24 14:08 hartib