diff --git a/runtime/core/evalue.h b/runtime/core/evalue.h index 8003a89cbf0..3bc2f43bf93 100644 --- a/runtime/core/evalue.h +++ b/runtime/core/evalue.h @@ -242,17 +242,20 @@ 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 (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. moveFrom(*std::forward(value)); - } +} + // Delete constructor for raw pointers to ensure they cannot be used. template 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