@@ -26,50 +26,23 @@ THRUST_NAMESPACE_BEGIN
26
26
27
27
/* --- Constructors --- */
28
28
29
- #if THRUST_CPP_DIALECT < 2011
30
- template <typename T>
31
- _CCCL_HOST_DEVICE complex<T>::complex()
32
- {
33
- real (T ());
34
- imag (T ());
35
- }
36
- #endif
37
-
38
29
template <typename T>
39
30
_CCCL_HOST_DEVICE complex<T>::complex(const T& re)
40
- #if THRUST_CPP_DIALECT >= 2011
41
31
// Initialize the storage in the member initializer list using C++ unicorn
42
32
// initialization. This allows `complex<T const>` to work.
43
33
: data{re, T ()}
44
34
{}
45
35
46
36
template <typename T>
47
37
_CCCL_HOST_DEVICE complex<T>::complex(const T& re, const T& im)
48
- #if THRUST_CPP_DIALECT >= 2011
49
38
// Initialize the storage in the member initializer list using C++ unicorn
50
39
// initialization. This allows `complex<T const>` to work.
51
40
: data{re, im}
52
41
{}
53
- #else
54
- {
55
- real (re);
56
- imag (im);
57
- }
58
- #endif
59
-
60
- #if THRUST_CPP_DIALECT < 2011
61
- template <typename T>
62
- _CCCL_HOST_DEVICE complex<T>::complex(const complex<T>& z)
63
- {
64
- real (z.real ());
65
- imag (z.imag ());
66
- }
67
- #endif
68
42
69
43
template <typename T>
70
44
template <typename U>
71
45
_CCCL_HOST_DEVICE complex<T>::complex(const complex<U>& z)
72
- #if THRUST_CPP_DIALECT >= 2011
73
46
// Initialize the storage in the member initializer list using C++ unicorn
74
47
// initialization. This allows `complex<T const>` to work.
75
48
// We do a functional-style cast here to suppress conversion warnings.
@@ -79,7 +52,6 @@ _CCCL_HOST_DEVICE complex<T>::complex(const complex<U>& z)
79
52
80
53
template <typename T>
81
54
_CCCL_HOST THRUST_STD_COMPLEX_DEVICE complex<T>::complex(const std::complex<T>& z)
82
- #if THRUST_CPP_DIALECT >= 2011
83
55
// Initialize the storage in the member initializer list using C++ unicorn
84
56
// initialization. This allows `complex<T const>` to work.
85
57
: data{THRUST_STD_COMPLEX_REAL (z), THRUST_STD_COMPLEX_IMAG (z)}
@@ -88,7 +60,6 @@ _CCCL_HOST THRUST_STD_COMPLEX_DEVICE complex<T>::complex(const std::complex<T>&
88
60
template <typename T>
89
61
template <typename U>
90
62
_CCCL_HOST THRUST_STD_COMPLEX_DEVICE complex<T>::complex(const std::complex<U>& z)
91
- #if THRUST_CPP_DIALECT >= 2011
92
63
// Initialize the storage in the member initializer list using C++ unicorn
93
64
// initialization. This allows `complex<T const>` to work.
94
65
// We do a functional-style cast here to suppress conversion warnings.
@@ -105,16 +76,6 @@ _CCCL_HOST_DEVICE complex<T>& complex<T>::operator=(const T& re)
105
76
return *this ;
106
77
}
107
78
108
- #if THRUST_CPP_DIALECT < 2011
109
- template <typename T>
110
- _CCCL_HOST_DEVICE complex<T>& complex<T>::operator =(const complex<T>& z)
111
- {
112
- real (z.real ());
113
- imag (z.imag ());
114
- return *this ;
115
- }
116
- #endif
117
-
118
79
template <typename T>
119
80
template <typename U>
120
81
_CCCL_HOST_DEVICE complex<T>& complex<T>::operator =(const complex<U>& z)
0 commit comments