MCPcopy Create free account
hub / github.com/bgrimstad/splinter / get_size

Method get_size

include/serializer.h:186–193  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

184
185template <class T>
186size_t Serializer::get_size(const T &obj)
187{
188 // This should really be used to avoid simply copying complex objects that are not trivially copyable
189 // std::is_trivially_copyable is shipped with GCC 5
190// static_assert(std::is_trivially_copyable<T>::value, "Missing Serializer::get_size overload for T = "/* __PRETTY_FUNCTION__*/);
191
192 return sizeof(T);
193}
194
195/*
196 * get_size specializations

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected