https://gcc.gnu.org/g:c4bf3291f20b8746a15ab3025c891f13f7e54298
commit r14-11588-gc4bf3291f20b8746a15ab3025c891f13f7e54298 Author: Jonathan Wakely <jwak...@redhat.com> Date: Fri Nov 1 10:09:55 2024 +0000 libstdc++: Define __is_pair variable template for C++11 libstdc++-v3/ChangeLog: * include/bits/stl_pair.h (__is_pair): Define for C++11 and C++14 as well. (cherry picked from commit dd08cdccc36d084eda0e2748c772f6bf9a7f412f) Diff: --- libstdc++-v3/include/bits/stl_pair.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libstdc++-v3/include/bits/stl_pair.h b/libstdc++-v3/include/bits/stl_pair.h index 45317417c9c2..3d33f68d59b0 100644 --- a/libstdc++-v3/include/bits/stl_pair.h +++ b/libstdc++-v3/include/bits/stl_pair.h @@ -1180,12 +1180,18 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION template<typename _Tp1, typename _Tp2> inline constexpr size_t tuple_size_v<const pair<_Tp1, _Tp2>> = 2; +#endif +#if __cplusplus >= 201103L +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wc++14-extensions" // variable templates +#pragma GCC diagnostic ignored "-Wc++17-extensions" // inline variables template<typename _Tp> inline constexpr bool __is_pair = false; template<typename _Tp, typename _Up> inline constexpr bool __is_pair<pair<_Tp, _Up>> = true; +#pragma GCC diagnostic pop #endif /// @cond undocumented