diff options
author | Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> | 2025-02-25 18:07:46 +0000 |
---|---|---|
committer | Jonathan Wakely <redi@gcc.gnu.org> | 2025-02-25 22:34:23 +0000 |
commit | 6a30ffd759ba004c77c7e37520659e9ab0eb80cc (patch) | |
tree | 7821454ebd753a84dc8105b79916e3b8d2124dd4 | |
parent | 2256e30874af2ef804bb19d2eba40f9c92953beb (diff) | |
download | gcc-6a30ffd759ba004c77c7e37520659e9ab0eb80cc.zip gcc-6a30ffd759ba004c77c7e37520659e9ab0eb80cc.tar.gz gcc-6a30ffd759ba004c77c7e37520659e9ab0eb80cc.tar.bz2 |
libstdc++: add a constexpr macro for C++26
Following the precedent of _GLIBCXX20_CONSTEXPR.
It will be used to decorate some functions which have been made
constexpr in C++26 (for instance P2562R1, and maybe P3508R0, P3369R0,
...).
libstdc++-v3/ChangeLog:
* include/bits/c++config (_GLIBCXX26_CONSTEXPR): New macro.
Signed-off-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
-rw-r--r-- | libstdc++-v3/include/bits/c++config | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libstdc++-v3/include/bits/c++config b/libstdc++-v3/include/bits/c++config index 07f75ea..6a73507 100644 --- a/libstdc++-v3/include/bits/c++config +++ b/libstdc++-v3/include/bits/c++config @@ -222,6 +222,14 @@ # endif #endif +#ifndef _GLIBCXX26_CONSTEXPR +# if __cplusplus >= 202400L +# define _GLIBCXX26_CONSTEXPR constexpr +# else +# define _GLIBCXX26_CONSTEXPR +# endif +#endif + #ifndef _GLIBCXX17_INLINE # if __cplusplus >= 201703L # define _GLIBCXX17_INLINE inline |