[clang] [clang] Constant evaluation support for `fmax{,f,l}` and `fmin{,f,l}` (PR #225824)

Lucas Mellone via cfe-commits cfe-commits at lists.llvm.org
Sat Nov 7 09:27:57 PST 2026


lknknm wrote:

> > See [[constexpr.functions]/1](https://eel.is/c++draft/constexpr.functions#1). IIUC, these functions are effectively required to be non-constexpr until C++23, and constexpr since C++23. So it's more conforming (to old revisions of the C++ standard, though) to leave that these functions non-constexpr in old modes.
> 
> 
> 
> How would we proceed on only making them constexpr on C++23 and onwards?

Enabling it in C++23 is a libc++ implementation, but firstly we need to enable it in clang.

I am implementing the Libc++ counterparts for these functions but we are still waiting for decisions between clang and libc.

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


More information about the cfe-commits mailing list