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 {
242
242
// Template constructor that allows construction from types that can be
243
243
// dereferenced to produce a type that EValue can be implicitly constructed
244
244
// 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) {
251
252
ET_CHECK_MSG (value != nullptr , " Pointer is null." );
252
253
// Note that this ctor does not initialize this->tag directly; it is set by
253
254
// moving in the new value.
Original file line number Diff line number Diff line change 9
9
#pragma once
10
10
11
11
#include < executorch/runtime/core/tensor_shape_dynamism.h> // @manual
12
+ #include < executorch/runtime/platform/compiler.h>
12
13
#ifdef USE_ATEN_LIB
13
14
#include < ATen/Tensor.h> // @manual
14
15
#include < c10/core/Device.h>
You can’t perform that action at this time.
0 commit comments