Open egpbos opened 7 years ago
It seems like it's been solved since clang 3.9 and 5.0. Will have to decide on how to proceed: upgrade compiler dependencies or keep the code as it is.
It seems like this is not actually used for fft and ifft anymore in basic.hpp.
We use template specializations to make sure we get the correct precision. The problem, for instance, with a non-template
f(const xt::xarray<float> &input)
is that it will also compile when you pass axt::xarray<double>
. Passing by const-reference in this sense behaves similarly to passing by value; it triggers the creation of a temporary variable -- input in this case -- though in the case of a reference the data is not actually copied.Using
= delete
syntax on the default template, e.g.:we can make sure that calls to non-implemented specializations don't compile. If this is left out, the compilation will succeed, but the linker will fail, and this gives less informative error messages.
Unfortunately, clang has a bug that prevents us from using the nice
= delete
syntax. For the moment we're using a workaround:This is ugly. Once the bug in clang is fixed, we will want to replace this with the
= delete
syntax.