[libcxx-commits] [libcxx] [libc++][format] Handle range-underlying-spec (PR #81914)

Mark de Wever via libcxx-commits libcxx-commits at lists.llvm.org
Fri Feb 16 09:46:39 PST 2024


mordante wrote:

> Because the tuple formatter like the range formatter prohibits ':' as a `fill` (__use_range_fill_ = true) but it doesn't have an underlying format-spec. So `{::<}` for tuples is a no-go but OK (align left, no fill for the underlying formatter) for ranges (`__has_range_underlying_spec_ = true` for this case).

I expected that motivation. I think it would be more future proof to handle tuple the same and get a slightly worse error message. If tuple gets an underlying format-spec we're less likely to reintroduce this bug. (I am investigating this feature for a future C++ proposal.)

https://github.com/llvm/llvm-project/pull/81914


More information about the libcxx-commits mailing list