Opened 7 years ago
Closed 7 years ago
#11758 closed Bugs (fixed)
BOOST_MOVABLE_BUT_NOT_COPYABLE doesn't reset private access with rvalue ref version
Reported by: | Owned by: | Ion Gaztañaga | |
---|---|---|---|
Milestone: | To Be Determined | Component: | move |
Version: | Boost 1.59.0 | Severity: | Problem |
Keywords: | Cc: |
Description
Hi
As subject, BOOST_NO_CXX11_RVALUE_REFERENCES version of BOOST_MOVABLE_BUT_NOT_COPYABLE from core.hpp:
#define BOOST_MOVABLE_BUT_NOT_COPYABLE(TYPE)\ BOOST_MOVE_IMPL_NO_COPY_CTOR_OR_ASSIGN(TYPE)\ public:\ operator ::boost::rv<TYPE>&() \ { return *BOOST_MOVE_TO_RV_CAST(::boost::rv<TYPE>*, this); }\ operator const ::boost::rv<TYPE>&() const \ { return *BOOST_MOVE_TO_RV_CAST(const ::boost::rv<TYPE>*, this); }\ private:\ //
rvalue ref version:
#define BOOST_MOVABLE_BUT_NOT_COPYABLE(TYPE)\ BOOST_MOVE_IMPL_NO_COPY_CTOR_OR_ASSIGN(TYPE)\ public:\ typedef int boost_move_emulation_t;\ //
Caused some head-scratching...
Regards
Luke Elliott.
Note:
See TracTickets
for help on using tickets.
Thanks for the report. Fixed in:
https://github.com/boostorg/move/commit/541f28037db36525f61e72a5d8ca3f86ac43f9a0