LWG3881 Incorrect formatting of container adapters backed by std::string
- Group Reviewers
- rG24c251d94daa: [libc++][format] Addresses LWG3881.
Any reason why you're using ref_view instead of all_t? Those are not always equivalent -- is the difference not relevant?
Mainly since that is what the wording in the LWG issue is. Victor's original proposed wording did use views::all_t.
[2023-02-10 Tim provides updated wording] The container elements may not be const-formattable so we cannot use the const formatter unconditionally. Also the current wording is broken because an adaptor is not range and we cannot use fmt-maybe-const on the adaptor — only the underlying container.
This is for passing a slightly disguised container into a function, not for view composition. It does not need the sometimes-by-reference-sometimes-by-copy-sometimes-ill-formed behavior of all_t.