mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-07 20:10:13 +02:00
Also define type erased small_vector extension
So bitsery knows how to handle small vectors that don't have a compile time known size as well.
This commit is contained in:
@@ -40,5 +40,21 @@ struct BufferAdapterTraits<boost::container::small_vector<T, N, Allocator>>
|
||||
: public StdContainerForBufferAdapter<
|
||||
boost::container::small_vector<T, N, Allocator>> {};
|
||||
|
||||
// And the same extensions again for the type erased version
|
||||
|
||||
template <typename T, typename Allocator>
|
||||
struct ContainerTraits<boost::container::small_vector_base<T, Allocator>>
|
||||
: public StdContainer<boost::container::small_vector_base<T, Allocator>,
|
||||
true,
|
||||
true> {
|
||||
static_assert(boost::container::dtl::is_contiguous_container<
|
||||
boost::container::small_vector_base<T, Allocator>>::value);
|
||||
};
|
||||
|
||||
template <typename T, typename Allocator>
|
||||
struct BufferAdapterTraits<boost::container::small_vector_base<T, Allocator>>
|
||||
: public StdContainerForBufferAdapter<
|
||||
boost::container::small_vector_base<T, Allocator>> {};
|
||||
|
||||
} // namespace traits
|
||||
} // namespace bitsery
|
||||
|
||||
Reference in New Issue
Block a user