[libcxx-commits] [libcxx] [libc++] Instantiate hash function externally (PR #127040)

Mark de Wever via libcxx-commits libcxx-commits at lists.llvm.org
Tue Feb 25 11:49:58 PST 2025


mordante wrote:

> > > > How would this change impact us when `std::map` becomes `constexpr`?
> > > 
> > > 
> > > `std::hash` is fundamentally not compatible with `constexpr` exectution and was not proposed to be made constexpr, so this doesn't affect us.
> > 
> > 
> > not yet ;-) but when it's fundamentally not compatible I don't mind moving it to the dylib.
> 
> Even if I'm wrong and it is possible, I don't think that should stop us from improving the library this way. As long as we don't put the public API in the dylib we can just add an `if consteval` somewhere.

Actually `std::unordered_map` is constexprified, but `std::hash` is not.

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


More information about the libcxx-commits mailing list