File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -242,12 +242,13 @@ struct EValue {
242242 // Template constructor that allows construction from types that can be
243243 // dereferenced to produce a type that EValue can be implicitly constructed
244244 // from.
245- template <typename T>
246- /* implicit*/ EValue(
247- T&& value,
248- typename std::enable_if<std::is_convertible<
249- decltype (*std::forward<T>(value)),
250- EValue>::value>::type* = 0 ) {
245+ template <
246+ typename T,
247+ typename = typename std::enable_if<std::is_convertible<
248+ decltype (*std::forward<T>(std::declval<T>())), // declval to simulate
249+ // forwarding
250+ EValue>::value>::type>
251+ /* implicit*/ EValue(T&& value) {
251252 ET_CHECK_MSG (value != nullptr , " Pointer is null." );
252253 // Note that this ctor does not initialize this->tag directly; it is set by
253254 // moving in the new value.
Original file line number Diff line number Diff line change 99#pragma once
1010
1111#include < executorch/runtime/core/tensor_shape_dynamism.h> // @manual
12+ #include < executorch/runtime/platform/compiler.h>
1213#ifdef USE_ATEN_LIB
1314#include < ATen/Tensor.h> // @manual
1415#include < c10/core/Device.h>
You can’t perform that action at this time.
0 commit comments