From cce6fd2e48602db7666de568cbf6afb15f131dd8 Mon Sep 17 00:00:00 2001 From: Vaibhav Thakkar Date: Fri, 27 Oct 2023 02:49:01 +0530 Subject: [PATCH] include algorithm --- include/clad/Differentiator/BuiltinDerivatives.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/clad/Differentiator/BuiltinDerivatives.h b/include/clad/Differentiator/BuiltinDerivatives.h index d7dd9d859..b2ecdbba4 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 +#if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L) template CUDA_HOST_DEVICE ValueAndPushforward clamp_pushforward(const T& v, const T& lo, const T& hi, const T& d_v,