diff --git a/include/clad/Differentiator/BuiltinDerivatives.h b/include/clad/Differentiator/BuiltinDerivatives.h index d7dd9d859..f61afb550 100644 --- a/include/clad/Differentiator/BuiltinDerivatives.h +++ b/include/clad/Differentiator/BuiltinDerivatives.h @@ -13,6 +13,7 @@ namespace custom_derivatives{} #include "clad/Differentiator/ArrayRef.h" #include "clad/Differentiator/CladConfig.h" +#include #include namespace clad { @@ -171,7 +172,7 @@ CUDA_HOST_DEVICE void max_pullback(const T& a, const T& b, U d_y, *d_a += d_y; } -#if __cplusplus >= 201703L +#ifdef __cpp_lib_clamp template CUDA_HOST_DEVICE ValueAndPushforward clamp_pushforward(const T& v, const T& lo, const T& hi, const T& d_v,