From: Jonathan Wakely Date: Fri, 1 Nov 2024 10:09:55 +0000 (+0000) Subject: libstdc++: Define __is_pair variable template for C++11 X-Git-Tag: releases/gcc-14.3.0~211 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c4bf3291f20b8746a15ab3025c891f13f7e54298;p=thirdparty%2Fgcc.git 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 --git a/libstdc++-v3/include/bits/stl_pair.h b/libstdc++-v3/include/bits/stl_pair.h index 45317417c9c..3d33f68d59b 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 inline constexpr size_t tuple_size_v> = 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 inline constexpr bool __is_pair = false; template inline constexpr bool __is_pair> = true; +#pragma GCC diagnostic pop #endif /// @cond undocumented