[libcxx-commits] [libcxx] [libc++] P3391R2: `constexpr` integral overloads of `to_(w)string` (PR #205025)

A. Jiang via libcxx-commits libcxx-commits at lists.llvm.org
Mon Jun 22 09:50:21 PDT 2026


frederick-vs-ja wrote:

> > > Can we keep using the old symbols somehow? E.g. with `__attributed__((enable_if))`.
> > 
> > 
> > Did you mean that making old versions still exposed in C++26 mode and mark new version with `__attributed__((enable_if))` (via `_LIBCPP_PREFERRED_OVERLOAD`)?
> 
> Yes, but the point here is to use the dylib symbol.

I'm not sure whether it's possible to use the dylib symbol.

If we expose dylib versions in C++26 mode and mark them `_LIBCPP_PREFERRED_OVERLOAD`, the additional `constexpr` versions won't wok at all. On the other hand, if we mark `constexpr` versions `_LIBCPP_PREFERRED_OVERLOAD`, the dylib versions wont't be used in C++26 mode even if they're exposed.

> > This doesn't seem to work with GCC.
> 
> Just because it doesn't work with GCC doesn't mean we have to regress with clang.

I think I failed to understand what did you mean by "regress".

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


More information about the libcxx-commits mailing list