[libcxx-commits] [libcxx] 662010e - [libc++][NFC] Use the tuple forward declaration header for tuple forward declarations

Nikolas Klauser via libcxx-commits libcxx-commits at lists.llvm.org
Sat Mar 16 07:47:27 PDT 2024


Author: Nikolas Klauser
Date: 2024-03-16T15:47:17+01:00
New Revision: 662010e5398e07287242688c144bd11faaf73861

URL: https://github.com/llvm/llvm-project/commit/662010e5398e07287242688c144bd11faaf73861
DIFF: https://github.com/llvm/llvm-project/commit/662010e5398e07287242688c144bd11faaf73861.diff

LOG: [libc++][NFC] Use the tuple forward declaration header for tuple forward declarations

Added: 
    

Modified: 
    libcxx/include/complex

Removed: 
    


################################################################################
diff  --git a/libcxx/include/complex b/libcxx/include/complex
index e996485a38ae67..a81f968143c4cf 100644
--- a/libcxx/include/complex
+++ b/libcxx/include/complex
@@ -258,6 +258,7 @@ template<class T> complex<T> tanh (const complex<T>&);
 
 #include <__config>
 #include <__fwd/complex.h>
+#include <__fwd/tuple.h>
 #include <__tuple/tuple_element.h>
 #include <__tuple/tuple_size.h>
 #include <__utility/move.h>
@@ -1443,15 +1444,9 @@ operator<<(basic_ostream<_CharT, _Traits>& __os, const complex<_Tp>& __x) {
 
 // [complex.tuple], tuple interface
 
-template <class _Tp>
-struct tuple_size;
-
 template <class _Tp>
 struct tuple_size<complex<_Tp>> : integral_constant<size_t, 2> {};
 
-template <size_t _Ip, class _Tp>
-struct tuple_element;
-
 template <size_t _Ip, class _Tp>
 struct tuple_element<_Ip, complex<_Tp>> {
   static_assert(_Ip < 2, "Index value is out of range.");


        


More information about the libcxx-commits mailing list