Skip to content

Commit 8fb2c18

Browse files
Convert some throw into static_assert
Should make some debugging easier.
1 parent f212f3c commit 8fb2c18

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
@@ -126,19 +126,19 @@ namespace xsimd {
126126
template <class A, class T>
127127
batch<std::complex<T>, A> load_complex(batch<T, A> const& /*hi*/, batch<T, A> const& /*lo*/, requires_arch<generic>)
128128
{
129-
throw std::runtime_error("load_complex not implemented");
129+
static_assert(std::is_same<T, void>::value, "load_complex not implemented for the required architecture");
130130
}
131131

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

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

0 commit comments

Comments
 (0)