Fix enable ifs in HISSTools_Library code

This commit is contained in:
Alex Harker
2019-08-14 15:24:08 +01:00
parent 31c5f4cf08
commit a71f846020
2 changed files with 13 additions and 7 deletions
+6 -3
View File
@@ -23,23 +23,26 @@ class kernel_smoother : private spectral_processor<T, Allocator>
using zipped_pointer = typename processor::zipped_pointer;
using in_ptr = typename processor::in_ptr;
template <bool B>
using enable_if_t = typename std::enable_if<B>::type;
public:
enum SmoothMode { kSmoothZeroPad, kSmoothWrap, kSmoothFold };
template <typename U = Allocator, typename = std::enable_if<std::is_default_constructible<U>::value>>
template <typename U = Allocator, typename = enable_if_t<std::is_default_constructible<U>::value>>
kernel_smoother()
{
set_max_fft_size(1 << 18);
}
template <typename U = Allocator, typename = std::enable_if<std::is_copy_constructible<U>::value>>
template <typename U = Allocator, typename = enable_if_t<std::is_copy_constructible<U>::value>>
kernel_smoother(const Allocator& allocator) : spectral_processor<T, Allocator>(allocator)
{
set_max_fft_size(1 << 18);
}
template <typename U = Allocator, typename = std::enable_if<std::is_move_constructible<U>::value>>
template <typename U = Allocator, typename = enable_if_t<std::is_move_constructible<U>::value>>
kernel_smoother(Allocator&& allocator) : spectral_processor<T, Allocator>(allocator)
{
set_max_fft_size(1 << 18);
+7 -4
View File
@@ -14,7 +14,10 @@ class spectral_processor
{
using Split = typename FFTTypes<T>::Split;
using Setup = typename FFTTypes<T>::Setup;
template <bool B>
using enable_if_t = typename std::enable_if<B>::type;
public:
enum EdgeMode { kEdgeLinear, kEdgeWrap, kEdgeWrapCentre, kEdgeFold };
@@ -29,19 +32,19 @@ public:
// Constructor
template <typename U = Allocator, typename = std::enable_if<std::is_default_constructible<U>::value>>
template <typename U = Allocator, typename = enable_if_t<std::is_default_constructible<U>::value>>
spectral_processor() : m_max_fft_size_log2(0)
{
set_max_fft_size(32768);
}
template <typename U = Allocator, typename = std::enable_if<std::is_copy_constructible<U>::value>>
template <typename U = Allocator, typename = enable_if_t<std::is_copy_constructible<U>::value>>
spectral_processor(const Allocator& allocator) : m_allocator(allocator), m_max_fft_size_log2(0)
{
set_max_fft_size(32768);
}
template <typename U = Allocator, typename = std::enable_if<std::is_move_constructible<U>::value>>
template <typename U = Allocator, typename = enable_if_t<std::is_move_constructible<U>::value>>
spectral_processor(Allocator&& allocator) : m_allocator(allocator), m_max_fft_size_log2(0)
{
set_max_fft_size(32768);