https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121097
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever confirmed|0 |1
Last reconfirmed| |2025-07-15
--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
--- a/libstdc++-v3/include/ext/type_traits.h
+++ b/libstdc++-v3/include/ext/type_traits.h
@@ -269,6 +269,14 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
{
typedef __typeof__(_Tp2() + _Up2() + _Vp2() + _Wp2()) __type;
};
+
+#ifdef __glibcxx_hypot // C++ >= 17 && HOSTED
+ // __promoted_t is needed by the 3-arg std::hypot so define it inefficiently
+ // for C++17 compilers that don't define __cpp_fold_expressions (PR 121097).
+ template<typename _Tp1, typename _Tp2, typename _Tp3>
+ using __promoted_t = typename __promote_3<_Tp1, _Tp2, _Tp3>::__type;
+#endif
+
#endif
_GLIBCXX_END_NAMESPACE_VERSION