// Type T is constructible from F.
template <typename F>
- static T
- value(const F &f,
- typename std::enable_if<
+ static DEAL_II_CUDA_HOST_DEV T
+ value(const F &f,
+ typename std::enable_if<
!std::is_same<typename std::decay<T>::type,
typename std::decay<F>::type>::value &&
std::is_constructible<T, F>::value>::type * = nullptr)
// the data is never compressed when we can't use zlib.
(void)allow_compression;
+ size_t size = 0;
+
// see if the object is small and copyable via memcpy. if so, use
// this fast path. otherwise, we have to go through the BOOST
// serialization machinery
std::memcpy(dest_buffer.data() + previous_size, &object, sizeof(T));
- return sizeof(T);
+ size = sizeof(T);
}
else
{
std::move(s.begin(), s.end(), std::back_inserter(dest_buffer));
}
- return (dest_buffer.size() - previous_size);
+ size = dest_buffer.size() - previous_size;
}
- // We should never get here
- Assert(false, ExcInternalError());
- return 0;
+ return size;
}