diff --git a/include/clad/Differentiator/Differentiator.h b/include/clad/Differentiator/Differentiator.h index d5c54ca40..bf139ae59 100644 --- a/include/clad/Differentiator/Differentiator.h +++ b/include/clad/Differentiator/Differentiator.h @@ -269,10 +269,9 @@ CUDA_HOST_DEVICE T push(tape& to, ArgsT... val) { constexpr CladFunctionType getFunctionPtr() const { return m_Function; } template - typename std::enable_if< - !std::is_same::value, - return_type_t>::type constexpr execute(Args&&... args) - CUDA_HOST_DEVICE const { + typename std::enable_if::value, + return_type_t>::type constexpr CUDA_HOST_DEVICE + execute(Args&&... args) const { if (!m_Function) return static_cast>(return_type_t()); if (m_CUDAkernel) { @@ -313,10 +312,9 @@ CUDA_HOST_DEVICE T push(tape& to, ArgsT... val) { /// Error handling is handled in the clad side using clang diagnostics /// subsystem. template - typename std::enable_if< - std::is_same::value, - return_type_t>::type constexpr execute(Args&&... args) - CUDA_HOST_DEVICE const { + typename std::enable_if::value, + return_type_t>::type constexpr CUDA_HOST_DEVICE + execute(Args&&... args) const { return static_cast>(0); }