Opened 8 years ago
Last modified 8 years ago
#10281 new Bugs
including intrusive/list.hpp breaks compilation using managed_shared_memory
Reported by: | Owned by: | Ion Gaztañaga | |
---|---|---|---|
Milestone: | To Be Determined | Component: | interprocess |
Version: | Boost 1.55.0 | Severity: | Problem |
Keywords: | Cc: |
Description
The following small program fails to compile:
#include <boost/intrusive/list.hpp> // comment out this to make error go away #include <boost/interprocess/managed_shared_memory.hpp> using namespace boost::interprocess; managed_shared_memory msm; void test() { msm = boost::interprocess::managed_shared_memory(open_or_create, "test", 100); }
/code/git/boost/boost/intrusive/pointer_traits.hpp:173:74: error: static_cast from type âboost::intrusive::pointer_traits<boost::interprocess::offset_ptr<const void, long int, long unsigned int, 0ul> >::element_type* {aka const void*}â to type âboost::intrusive::pointer_traits<boost::interprocess::offset_ptr<boost::intrusive::bhtraits<boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family>::block_ctrl, boost::intrusive::rbtree_node_traits<boost::interprocess::offset_ptr<void>, true>, (boost::intrusive::link_mode_type)0u, boost::intrusive::default_tag, 3u>, long int, long unsigned int, 0ul> >::element_type* {aka boost::intrusive::bhtraits<boost::interprocess::rbtree_best_fit<boost::interprocess::mutex_family>::block_ctrl, boost::intrusive::rbtree_node_traits<boost::interprocess::offset_ptr<void>, true>, (boost::intrusive::link_mode_type)0u, boost::intrusive::default_tag, 3u>*}â casts away qualifiers
cc --version gcc (Ubuntu/Linaro 4.7.2-2ubuntu1) 4.7.2
Compiled in Mingw with GCC-4.7.3 and GCC-4.8 with current code, there is no error. Can you try the Boost 1.56 Beta to see if the problem is already solved?