Skip to content

Commit 96fc4fb

Browse files
committed
remove useless preprocessors
1 parent 05215b4 commit 96fc4fb

File tree

1 file changed

+0
-39
lines changed

1 file changed

+0
-39
lines changed

thrust/thrust/detail/complex/complex.inl

-39
Original file line numberDiff line numberDiff line change
@@ -26,50 +26,23 @@ THRUST_NAMESPACE_BEGIN
2626

2727
/* --- Constructors --- */
2828

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-
3829
template <typename T>
3930
_CCCL_HOST_DEVICE complex<T>::complex(const T& re)
40-
#if THRUST_CPP_DIALECT >= 2011
4131
// Initialize the storage in the member initializer list using C++ unicorn
4232
// initialization. This allows `complex<T const>` to work.
4333
: data{re, T()}
4434
{}
4535

4636
template <typename T>
4737
_CCCL_HOST_DEVICE complex<T>::complex(const T& re, const T& im)
48-
#if THRUST_CPP_DIALECT >= 2011
4938
// Initialize the storage in the member initializer list using C++ unicorn
5039
// initialization. This allows `complex<T const>` to work.
5140
: data{re, im}
5241
{}
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
6842

6943
template <typename T>
7044
template <typename U>
7145
_CCCL_HOST_DEVICE complex<T>::complex(const complex<U>& z)
72-
#if THRUST_CPP_DIALECT >= 2011
7346
// Initialize the storage in the member initializer list using C++ unicorn
7447
// initialization. This allows `complex<T const>` to work.
7548
// 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)
7952

8053
template <typename T>
8154
_CCCL_HOST THRUST_STD_COMPLEX_DEVICE complex<T>::complex(const std::complex<T>& z)
82-
#if THRUST_CPP_DIALECT >= 2011
8355
// Initialize the storage in the member initializer list using C++ unicorn
8456
// initialization. This allows `complex<T const>` to work.
8557
: 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>&
8860
template <typename T>
8961
template <typename U>
9062
_CCCL_HOST THRUST_STD_COMPLEX_DEVICE complex<T>::complex(const std::complex<U>& z)
91-
#if THRUST_CPP_DIALECT >= 2011
9263
// Initialize the storage in the member initializer list using C++ unicorn
9364
// initialization. This allows `complex<T const>` to work.
9465
// 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)
10576
return *this;
10677
}
10778

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-
11879
template <typename T>
11980
template <typename U>
12081
_CCCL_HOST_DEVICE complex<T>& complex<T>::operator=(const complex<U>& z)

0 commit comments

Comments
 (0)