Skip to content

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

@hartib

Description

@hartib

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions