Skip to content

Truly-recursive inherited vector cannot be formatted by std::formatter #46

@saki7

Description

@saki7

I think this is yet another corner case that invokes legitimate recursive instantiation, perhaps some leftover from #11.

Note that the default std::formatter specialization for ranges seem to be available these days, so applying the formatting function itself works out of the box (the range formatter delegates to the child formatter, hence the recursive instantiation).

Explicitly defining a custom std::formatter specialization also seems not working because it's essentially the same thing as above when you just call formatter by iterating each elements.

From the previous experience, I'm guessing that splitting declaration and definition is the primary candidate of the solution, but I'm not sure how it can be applied to the std::formatter specialization.

What is the practical way to solving this issue? Investigation needed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requestedtests neededUnit tests are required for all public API

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions