id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 7969,BOOST_MOVABLE_BUT_NOT_COPYABLE makes it impossible to use type in GCC containners in C++11,Antony Polukhin,Ion Gaztañaga,"BOOST_MOVABLE_BUT_NOT_COPYABLE(TYPE) defines: TYPE(const TYPE &); TYPE& operator=(const TYPE &); which makes GCC assume that class have copy constructor and assignment operator. That makes STL containers to choose assignment operator instead of move assignment. The solution would be to mark them in c++11 with '= delete' or not write them at all (compiler shall not generate copy constructors if there is a move constructor, but this may not work on some compilers): {{{ #ifndef BOOST_NO_CXX11_DELETED_FUNCTIONS #define BOOST_MOVABLE_BUT_NOT_COPYABLE(TYPE)\ public:\ typedef int boost_move_emulation_t;\ private:\ TYPE(const TYPE &) = delete;\ TYPE& operator=(const TYPE &) = delete;\ #else #define BOOST_MOVABLE_BUT_NOT_COPYABLE(TYPE)\ public:\ typedef int boost_move_emulation_t;\ private:\ #endif }}} Example to reproduce the error: {{{ #include #include class descriptor_owner_movable { void* descriptor_; BOOST_MOVABLE_BUT_NOT_COPYABLE(descriptor_owner_movable) public: descriptor_owner_movable(){} descriptor_owner_movable(BOOST_RV_REF(descriptor_owner_movable) param) {} descriptor_owner_movable& operator=(BOOST_RV_REF(descriptor_owner_movable) param) { return *this; } }; int main() { std::vector vec; vec.resize(10); return 0; } }}} Tested on GCC 4.7.2 with -std=c++0x flag",Bugs,closed,To Be Determined,move,Boost Development Trunk,Problem,fixed,c++11 c++0x noncopyable stl,