Commit 7eaf387c authored by Matthias Vallentin's avatar Matthias Vallentin

Prioritize serialize overload when inspect exists

parent 721ee285
...@@ -430,7 +430,12 @@ public: ...@@ -430,7 +430,12 @@ public:
virtual error apply_raw(size_t num_bytes, void* data) = 0; virtual error apply_raw(size_t num_bytes, void* data) = 0;
template <class T> template <class T>
auto apply(T& x) -> decltype(inspect(std::declval<Derived&>(), x)) { typename std::enable_if<
detail::is_inspectable<Derived, T>::value
&& !detail::has_serialize<T>::value,
error
>::type
apply(T& x) {
return inspect(dref(), x); return inspect(dref(), x);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment