id summary reporter owner description type status milestone component version severity resolution keywords cc 1634 boost::interprocess::vector cannot contain volatile int Lars Hagström Ion Gaztañaga "It does not appear to be possible to create a boost::interprocess::vector. When modifying the example at [http://igaztanaga.drivehq.com/interprocess/interprocess/quick_guide/qg_interprocess_container.html] to use volatile int instead of int I get the following long list of errors. {{{ boost/interprocess/containers/vector.hpp: In member function ‘void boost::interprocess::vector::push_back(const T&) [with T = volatile int, A = boost::interprocess::allocator >, boost::interprocess::iset_index> >]’: volint.cpp:37: instantiated from here boost/interprocess/containers/vector.hpp:853: error: invalid conversion from ‘volatile void*’ to ‘void*’ boost/interprocess/containers/vector.hpp:853: error: initializing argument 2 of ‘void* operator new(size_t, void*)’ boost/interprocess/allocators/allocator.hpp: In member function ‘void boost::interprocess::allocator::deallocate(const typename boost::interprocess::detail::pointer_to_other::type, T>::type&, size_t) [with T = volatile int, SegmentManager = boost::interprocess::segment_manager >, boost::interprocess::iset_index>]’: boost/interprocess/containers/vector.hpp:1284: instantiated from ‘void boost::interprocess::vector::priv_range_insert_new_allocation(T*, typename A::size_type, T*, FwdIt, FwdIt) [with FwdIt = boost::interprocess::constant_iterator, T = volatile int, A = boost::interprocess::allocator >, boost::interprocess::iset_index> >]’ boost/interprocess/containers/vector.hpp:1202: instantiated from ‘void boost::interprocess::vector::priv_range_insert(typename A::pointer, FwdIt, FwdIt, std::forward_iterator_tag) [with FwdIt = boost::interprocess::constant_iterator, T = volatile int, A = boost::interprocess::allocator >, boost::interprocess::iset_index> >]’ boost/interprocess/containers/vector.hpp:1772: instantiated from ‘void boost::interprocess::vector::priv_insert_dispatch(boost::interprocess::detail::vector_iterator, InIt, InIt, boost::interprocess::detail::false_) [with InIt = boost::interprocess::constant_iterator, T = volatile int, A = boost::interprocess::allocator >, boost::interprocess::iset_index> >]’ boost/interprocess/containers/vector.hpp:994: instantiated from ‘void boost::interprocess::vector::insert(boost::interprocess::detail::vector_iterator, InIt, InIt) [with InIt = boost::interprocess::constant_iterator, T = volatile int, A = boost::interprocess::allocator >, boost::interprocess::iset_index> >]’ boost/interprocess/containers/vector.hpp:1005: instantiated from ‘void boost::interprocess::vector::insert(boost::interprocess::detail::vector_iterator, typename A::size_type, const T&) [with T = volatile int, A = boost::interprocess::allocator >, boost::interprocess::iset_index> >]’ boost/interprocess/containers/vector.hpp:946: instantiated from ‘boost::interprocess::detail::vector_iterator boost::interprocess::vector::insert(boost::interprocess::detail::vector_iterator, const T&) [with T = volatile int, A = boost::interprocess::allocator >, boost::interprocess::iset_index> >]’ boost/interprocess/containers/vector.hpp:857: instantiated from ‘void boost::interprocess::vector::push_back(const T&) [with T = volatile int, A = boost::interprocess::allocator >, boost::interprocess::iset_index> >]’ volint.cpp:37: instantiated from here boost/interprocess/allocators/allocator.hpp:157: error: invalid conversion from ‘volatile void*’ to ‘void*’ boost/interprocess/allocators/allocator.hpp:157: error: initializing argument 1 of ‘void boost::interprocess::segment_manager_base::deallocate(void*) [with MemoryAlgorithm = boost::interprocess::rbtree_best_fit >]’ /usr/lib/gcc/i686-pc-linux-gnu/4.1.2/include/g++-v4/bits/stl_construct.h: In function ‘void std::_Construct(_T1*, const _T2&) [with _T1 = volatile int, _T2 = volatile int]’: /usr/lib/gcc/i686-pc-linux-gnu/4.1.2/include/g++-v4/bits/stl_uninitialized.h:86: instantiated from ‘_ForwardIterator std::__uninitialized_copy_aux(_InputIterator, _InputIterator, _ForwardIterator, __false_type) [with _InputIterator = boost::interprocess::detail::move_iterator, _ForwardIterator = volatile int*]’ /usr/lib/gcc/i686-pc-linux-gnu/4.1.2/include/g++-v4/bits/stl_uninitialized.h:113: instantiated from ‘_ForwardIterator std::uninitialized_copy(_InputIterator, _InputIterator, _ForwardIterator) [with _InputIterator = boost::interprocess::detail::move_iterator, _ForwardIterator = volatile int*]’ boost/interprocess/containers/vector.hpp:1223: instantiated from ‘void boost::interprocess::vector::priv_range_insert_expand_forward(T*, FwdIt, FwdIt, typename A::size_type) [with FwdIt = boost::interprocess::constant_iterator, T = volatile int, A = boost::interprocess::allocator >, boost::interprocess::iset_index> >]’ boost/interprocess/containers/vector.hpp:1187: instantiated from ‘void boost::interprocess::vector::priv_range_insert(typename A::pointer, FwdIt, FwdIt, std::forward_iterator_tag) [with FwdIt = boost::interprocess::constant_iterator, T = volatile int, A = boost::interprocess::allocator >, boost::interprocess::iset_index> >]’ boost/interprocess/containers/vector.hpp:1772: instantiated from ‘void boost::interprocess::vector::priv_insert_dispatch(boost::interprocess::detail::vector_iterator, InIt, InIt, boost::interprocess::detail::false_) [with InIt = boost::interprocess::constant_iterator, T = volatile int, A = boost::interprocess::allocator >, boost::interprocess::iset_index> >]’ boost/interprocess/containers/vector.hpp:994: instantiated from ‘void boost::interprocess::vector::insert(boost::interprocess::detail::vector_iterator, InIt, InIt) [with InIt = boost::interprocess::constant_iterator, T = volatile int, A = boost::interprocess::allocator >, boost::interprocess::iset_index> >]’ boost/interprocess/containers/vector.hpp:1005: instantiated from ‘void boost::interprocess::vector::insert(boost::interprocess::detail::vector_iterator, typename A::size_type, const T&) [with T = volatile int, A = boost::interprocess::allocator >, boost::interprocess::iset_index> >]’ boost/interprocess/containers/vector.hpp:946: instantiated from ‘boost::interprocess::detail::vector_iterator boost::interprocess::vector::insert(boost::interprocess::detail::vector_iterator, const T&) [with T = volatile int, A = boost::interprocess::allocator >, boost::interprocess::iset_index> >]’ boost/interprocess/containers/vector.hpp:857: instantiated from ‘void boost::interprocess::vector::push_back(const T&) [with T = volatile int, A = boost::interprocess::allocator >, boost::interprocess::iset_index> >]’ volint.cpp:37: instantiated from here /usr/lib/gcc/i686-pc-linux-gnu/4.1.2/include/g++-v4/bits/stl_construct.h:81: error: invalid static_cast from type ‘volatile int*’ to type ‘void*’ boost/interprocess/mem_algo/rbtree_best_fit.hpp: In member function ‘std::pair boost::interprocess::rbtree_best_fit::allocation_command(boost::interprocess::allocation_type, size_t, size_t, size_t&, T*) [with T = volatile int, MutexFamily = boost::interprocess::mutex_family, VoidPointer = boost::interprocess::offset_ptr]’: boost/interprocess/segment_manager.hpp:186: instantiated from ‘std::pair boost::interprocess::segment_manager_base::allocation_command(boost::interprocess::allocation_type, size_t, size_t, size_t&, T*) [with T = volatile int, MemoryAlgorithm = boost::interprocess::rbtree_best_fit >]’ boost/interprocess/allocators/allocator.hpp:178: instantiated from ‘std::pair::type, T>::type, bool> boost::interprocess::allocator::allocation_command(boost::interprocess::allocation_type, size_t, size_t, size_t&, const typename boost::interprocess::detail::pointer_to_other::type, T>::type&) [with T = volatile int, SegmentManager = boost::interprocess::segment_manager >, boost::interprocess::iset_index>]’ boost/interprocess/containers/vector.hpp:305: instantiated from ‘std::pair boost::interprocess::detail::vector_alloc_holder::allocation_command(boost::interprocess::allocation_type, typename A::size_type, typename A::size_type, typename A::size_type&, const typename A::pointer&, boost::interprocess::detail::integral_constant) [with A = boost::interprocess::allocator >, boost::interprocess::iset_index> >]’ boost/interprocess/containers/vector.hpp:277: instantiated from ‘std::pair boost::interprocess::detail::vector_alloc_holder::allocation_command(boost::interprocess::allocation_type, typename A::size_type, typename A::size_type, typename A::size_type&, const typename A::pointer&) [with A = boost::interprocess::allocator >, boost::interprocess::iset_index> >]’ boost/interprocess/containers/vector.hpp:1174: instantiated from ‘void boost::interprocess::vector::priv_range_insert(typename A::pointer, FwdIt, FwdIt, std::forward_iterator_tag) [with FwdIt = boost::interprocess::constant_iterator, T = volatile int, A = boost::interprocess::allocator >, boost::interprocess::iset_index> >]’ boost/interprocess/containers/vector.hpp:1772: instantiated from ‘void boost::interprocess::vector::priv_insert_dispatch(boost::interprocess::detail::vector_iterator, InIt, InIt, boost::interprocess::detail::false_) [with InIt = boost::interprocess::constant_iterator, T = volatile int, A = boost::interprocess::allocator >, boost::interprocess::iset_index> >]’ boost/interprocess/containers/vector.hpp:994: instantiated from ‘void boost::interprocess::vector::insert(boost::interprocess::detail::vector_iterator, InIt, InIt) [with InIt = boost::interprocess::constant_iterator, T = volatile int, A = boost::interprocess::allocator >, boost::interprocess::iset_index> >]’ boost/interprocess/containers/vector.hpp:1005: instantiated from ‘void boost::interprocess::vector::insert(boost::interprocess::detail::vector_iterator, typename A::size_type, const T&) [with T = volatile int, A = boost::interprocess::allocator >, boost::interprocess::iset_index> >]’ boost/interprocess/containers/vector.hpp:946: instantiated from ‘boost::interprocess::detail::vector_iterator boost::interprocess::vector::insert(boost::interprocess::detail::vector_iterator, const T&) [with T = volatile int, A = boost::interprocess::allocator >, boost::interprocess::iset_index> >]’ boost/interprocess/containers/vector.hpp:857: instantiated from ‘void boost::interprocess::vector::push_back(const T&) [with T = volatile int, A = boost::interprocess::allocator >, boost::interprocess::iset_index> >]’ volint.cpp:37: instantiated from here boost/interprocess/mem_algo/rbtree_best_fit.hpp:643: error: invalid conversion from ‘volatile void*’ to ‘void*’ boost/interprocess/mem_algo/rbtree_best_fit.hpp:643: error: initializing argument 2 of ‘static bool boost::interprocess::detail::memory_algorithm_common::try_shrink(MemoryAlgorithm*, void*, size_t, size_t, size_t&) [with MemoryAlgorithm = boost::interprocess::rbtree_best_fit >]’ boost/interprocess/segment_manager.hpp:186: instantiated from ‘std::pair boost::interprocess::segment_manager_base::allocation_command(boost::interprocess::allocation_type, size_t, size_t, size_t&, T*) [with T = volatile int, MemoryAlgorithm = boost::interprocess::rbtree_best_fit >]’ boost/interprocess/allocators/allocator.hpp:178: instantiated from ‘std::pair::type, T>::type, bool> boost::interprocess::allocator::allocation_command(boost::interprocess::allocation_type, size_t, size_t, size_t&, const typename boost::interprocess::detail::pointer_to_other::type, T>::type&) [with T = volatile int, SegmentManager = boost::interprocess::segment_manager >, boost::interprocess::iset_index>]’ boost/interprocess/containers/vector.hpp:305: instantiated from ‘std::pair boost::interprocess::detail::vector_alloc_holder::allocation_command(boost::interprocess::allocation_type, typename A::size_type, typename A::size_type, typename A::size_type&, const typename A::pointer&, boost::interprocess::detail::integral_constant) [with A = boost::interprocess::allocator >, boost::interprocess::iset_index> >]’ boost/interprocess/containers/vector.hpp:277: instantiated from ‘std::pair boost::interprocess::detail::vector_alloc_holder::allocation_command(boost::interprocess::allocation_type, typename A::size_type, typename A::size_type, typename A::size_type&, const typename A::pointer&) [with A = boost::interprocess::allocator >, boost::interprocess::iset_index> >]’ boost/interprocess/containers/vector.hpp:1174: instantiated from ‘void boost::interprocess::vector::priv_range_insert(typename A::pointer, FwdIt, FwdIt, std::forward_iterator_tag) [with FwdIt = boost::interprocess::constant_iterator, T = volatile int, A = boost::interprocess::allocator >, boost::interprocess::iset_index> >]’ boost/interprocess/containers/vector.hpp:1772: instantiated from ‘void boost::interprocess::vector::priv_insert_dispatch(boost::interprocess::detail::vector_iterator, InIt, InIt, boost::interprocess::detail::false_) [with InIt = boost::interprocess::constant_iterator, T = volatile int, A = boost::interprocess::allocator >, boost::interprocess::iset_index> >]’ boost/interprocess/containers/vector.hpp:994: instantiated from ‘void boost::interprocess::vector::insert(boost::interprocess::detail::vector_iterator, InIt, InIt) [with InIt = boost::interprocess::constant_iterator, T = volatile int, A = boost::interprocess::allocator >, boost::interprocess::iset_index> >]’ boost/interprocess/containers/vector.hpp:1005: instantiated from ‘void boost::interprocess::vector::insert(boost::interprocess::detail::vector_iterator, typename A::size_type, const T&) [with T = volatile int, A = boost::interprocess::allocator >, boost::interprocess::iset_index> >]’ boost/interprocess/containers/vector.hpp:946: instantiated from ‘boost::interprocess::detail::vector_iterator boost::interprocess::vector::insert(boost::interprocess::detail::vector_iterator, const T&) [with T = volatile int, A = boost::interprocess::allocator >, boost::interprocess::iset_index> >]’ boost/interprocess/containers/vector.hpp:857: instantiated from ‘void boost::interprocess::vector::push_back(const T&) [with T = volatile int, A = boost::interprocess::allocator >, boost::interprocess::iset_index> >]’ volint.cpp:37: instantiated from here boost/interprocess/mem_algo/rbtree_best_fit.hpp:647: error: invalid conversion from ‘volatile void*’ to ‘void*’ boost/interprocess/mem_algo/rbtree_best_fit.hpp:647: error: initializing argument 5 of ‘std::pair boost::interprocess::rbtree_best_fit::priv_allocation_command(boost::interprocess::allocation_type, size_t, size_t, size_t&, void*, size_t) [with MutexFamily = boost::interprocess::mutex_family, VoidPointer = boost::interprocess::offset_ptr]’ make[2]: *** [CMakeFiles/volint.dir/volint.o] Error 1 make[1]: *** [CMakeFiles/volint.dir/all] Error 2 make: *** [all] Error 2 }}} " Bugs closed To Be Determined interprocess Boost Development Trunk Problem worksforme