diff --git a/runtime/core/evalue.h b/runtime/core/evalue.h index 8003a89cbf0..500c2bc4f0e 100644 --- a/runtime/core/evalue.h +++ b/runtime/core/evalue.h @@ -242,12 +242,13 @@ struct EValue { // Template constructor that allows construction from types that can be // dereferenced to produce a type that EValue can be implicitly constructed // from. - template - /*implicit*/ EValue( - T&& value, - typename std::enable_if(value)), - EValue>::value>::type* = 0) { + template < + typename T, + typename = typename std::enable_if(std::declval())), // declval to simulate + // forwarding + EValue>::value>::type> + /*implicit*/ EValue(T&& value) { ET_CHECK_MSG(value != nullptr, "Pointer is null."); // Note that this ctor does not initialize this->tag directly; it is set by // moving in the new value. diff --git a/runtime/core/exec_aten/exec_aten.h b/runtime/core/exec_aten/exec_aten.h index bfb47daa05d..708fb69d577 100644 --- a/runtime/core/exec_aten/exec_aten.h +++ b/runtime/core/exec_aten/exec_aten.h @@ -9,6 +9,7 @@ #pragma once #include // @manual +#include #ifdef USE_ATEN_LIB #include // @manual #include