diff options
| author | Patrick Palka <ppalka@redhat.com> | 2025-12-05 12:14:18 -0500 |
|---|---|---|
| committer | Patrick Palka <ppalka@redhat.com> | 2025-12-05 12:14:18 -0500 |
| commit | 101f96847629850edbdfceb11b363770be4fd69d (patch) | |
| tree | 3251ff1f485bc03446045216d27607acdc518800 | |
| parent | c48b55fa7764477008fbf187fadb352e3391a3f5 (diff) | |
| download | gcc-101f96847629850edbdfceb11b363770be4fd69d.zip gcc-101f96847629850edbdfceb11b363770be4fd69d.tar.gz gcc-101f96847629850edbdfceb11b363770be4fd69d.tar.bz2 | |
libstdc++: Introduce _GLIBCXX_EXPLICIT_THIS_PARAMETER internal FTM
This FTM is like __cpp_explicit_this_parameter but is also defined
in earlier C++ modes if deducing this is supported as an extension
by the compiler. Currently only GCC supports this, Clang doesn't.
libstdc++-v3/ChangeLog:
* include/bits/c++config (_GLIBCXX_EXPLICIT_THIS_PARAMETER):
New.
Reviewed-by: Tomasz KamiĆski <tkaminsk@redhat.com>
Reviewed-by: Jonathan Wakely <jwakely@redhat.com>
| -rw-r--r-- | libstdc++-v3/include/bits/c++config | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libstdc++-v3/include/bits/c++config b/libstdc++-v3/include/bits/c++config index eec3a4a..e6d8f18 100644 --- a/libstdc++-v3/include/bits/c++config +++ b/libstdc++-v3/include/bits/c++config @@ -927,6 +927,13 @@ namespace __gnu_cxx # define _GLIBCXX_USE_BUILTIN_TRAIT(BT) 0 #endif +// Whether deducing this is usable either officially, if in C++23 mode, or +// as an extension (Clang doesn't support the latter). +#if __cpp_explicit_this_parameter \ + || (__cplusplus >= 201103L && __GNUC__ >= 14 && !defined(_GLIBCXX_CLANG)) +# define _GLIBCXX_EXPLICIT_THIS_PARAMETER 202110L +#endif + // Mark code that should be ignored by the compiler, but seen by Doxygen. #define _GLIBCXX_DOXYGEN_ONLY(X) |
