This questionable combination of flags causes a number of errors. The
ones in the rvalue stream overloads need to be fixed in the gcc-14
branch so I'm committing it separately to simplify backporting.
libstdc++-v3/ChangeLog:
PR libstdc++/116070
* include/std/istream: Check feature test macro before using
is_class_v and is_same_v.
* include/std/ostream: Likewise.
// 2328. Rvalue stream extraction should use perfect forwarding
// 1203. More useful rvalue stream insertion
-#if __cpp_concepts >= 201907L
+#if __cpp_concepts >= 201907L && __glibcxx_type_trait_variable_templates
template<typename _Is, typename _Tp>
requires __derived_from_ios_base<_Is>
&& requires (_Is& __is, _Tp&& __t) { __is >> std::forward<_Tp>(__t); }
// _GLIBCXX_RESOLVE_LIB_DEFECTS
// 1203. More useful rvalue stream insertion
-#if __cpp_concepts >= 201907L
+#if __cpp_concepts >= 201907L && __glibcxx_type_trait_variable_templates
// Use concepts if possible because they're cheaper to evaluate.
template<typename _Tp>
concept __derived_from_ios_base = is_class_v<_Tp>