Hi everybody,
how are you?
I am a completely noob when it comes to Boost. :D But not a noob when it comes to C++. Though, am a bit noobish when it comes to C++14 and beyond :D
I am trying to construct a complex data container, which has a vector of floats, on managed shared memory.
I followed the documentation, added the appropriate headers and made the following declarations:
typedef managed_windows_shared_memory::segment_manager segment_manager_t;
typedef allocator void_allocator;
typedef basic_string shared_string;
typedef allocator float_allocator;
typedef vector float_vector;
typedef allocator float_vector_allocator;
class ComplexContainer {shared_string name;float_vector channelData;
public:ComplexContainer(const char * name_, const float* data_start, const float* data_end, const void_allocator& void_alloc) : name(name_), channelData(data_start, data_end, void_alloc) {}
ComplexContainer(const void_allocator& void_alloc) : name(void_alloc), channelData(void_alloc){}
ComplexContainer() {}
}
but I am getting these errors at compile:
1>D:\Libraries\boost_1_72_0\boost\container\vector.hpp(310,23): error C2512: 'boost::interprocess::allocator::allocator': no appropriate default constructor available1>D:\Libraries\boost_1_72_0\boost\container\vector.hpp(308): message : while compiling class template member function 'boost::container::vector_alloc_holder,unsigned __int64,boost::move_detail::integral_constant>::vector_alloc_holder(void) noexcept(false)'1>D:\Libraries\boost_1_72_0\boost\container\vector.hpp(832): message : see reference to function template instantiation 'boost::container::vector_alloc_holder,unsigned __int64,boost::move_detail::integral_constant>::vector_alloc_holder(void) noexcept(false)' being compiled1>D:\Libraries\boost_1_72_0\boost\container\vector.hpp(779): message : see reference to class template instantiation 'boost::container::vector_alloc_holder,unsigned __int64,boost::move_detail::integral_constant>' being compiled
message : see reference to class template instantiation 'boost::container::vector' being compiled
That doesn't make a whole lot of sense, since it seems to be referring to the "float_allocator" typedef. But float is not an object, it has no constructor.
Any help would be greatly appreciated!
Thank you!
Da.