Skip to content

Commit 7462f0a

Browse files
serge-sans-pailleJohanMabille
authored andcommitted
Convert some throw into static_assert
Should make some debugging easier.
1 parent f6aa3b0 commit 7462f0a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

include/xsimd/arch/generic/xsimd_generic_memory.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,19 +130,19 @@ namespace xsimd {
130130
template <class A, class T>
131131
batch<std::complex<T>, A> load_complex(batch<T, A> const& /*hi*/, batch<T, A> const& /*lo*/, requires_arch<generic>)
132132
{
133-
throw std::runtime_error("load_complex not implemented");
133+
static_assert(std::is_same<T, void>::value, "load_complex not implemented for the required architecture");
134134
}
135135

136136
template <class A, class T>
137137
batch<T, A> complex_high(batch<std::complex<T>, A> const& /*src*/, requires_arch<generic>)
138138
{
139-
throw std::runtime_error("complex_high not implemented");
139+
static_assert(std::is_same<T, void>::value, "complex_high not implemented for the required architecture");
140140
}
141141

142142
template <class A, class T>
143143
batch<T, A> complex_low(batch<std::complex<T>, A> const& /*src*/, requires_arch<generic>)
144144
{
145-
throw std::runtime_error("complex_low not implemented");
145+
static_assert(std::is_same<T, void>::value, "complex_low not implemented for the required architecture");
146146
}
147147
}
148148

0 commit comments

Comments
 (0)