Skip to content

Commit 6cae791

Browse files
committed
Use is_complex_v in real and imag
1 parent 8355bd5 commit 6cae791

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

dpctl/tensor/libtensor/include/kernels/elementwise_functions/imag.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ template <typename argT, typename resT> struct ImagFunctor
7171

7272
resT operator()(const argT &in) const
7373
{
74-
if constexpr (is_complex<argT>::value) {
74+
if constexpr (is_complex_v<argT>) {
7575
return std::imag(in);
7676
}
7777
else {

dpctl/tensor/libtensor/include/kernels/elementwise_functions/real.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ template <typename argT, typename resT> struct RealFunctor
6969

7070
resT operator()(const argT &in) const
7171
{
72-
if constexpr (is_complex<argT>::value) {
72+
if constexpr (is_complex_v<argT>) {
7373
return std::real(in);
7474
}
7575
else {

0 commit comments

Comments
 (0)