Opened 6 years ago

Closed 5 years ago

#6524 closed Feature Requests (fixed)

Better header segregation

Reported by: Andrey Semashev Owned by: Ion Gaztañaga
Milestone: To Be Determined Component: move
Version: Boost 1.48.0 Severity: Optimization
Keywords: Cc:


Please, provide better segregated headers. Currently, including <boost/move/move.hpp> causes inclusion of a few heavy STL headers (algorithm, memory) along with several Boost headers. Most of these dependencies are required to implement move algorithms and iterators.

I would like to have a header that only defines facilities to define movable classes (the BOOST_RV_REF and other related macros). Ideally, when C++11 rvalue references are supported by compiler, this header should not include anything but <boost/config.hpp>. When native rvalue references are not available, the header should only contain facilities to implement move emulation (boost::rv and related).

Algorithms (move, forward, etc.) and iterators should be available through separate headers. Preferably, move and forward algorithms should be available in their own headers as these ones are often the only algorithms needed in the user's code.

Attachments (0)

Change History (1)

comment:1 Changed 5 years ago by Ion Gaztañaga

Resolution: fixed
Status: newclosed

Merged to release branch, revision 81660. New headers:

boost/move/core.hpp move emulation (boost::rv) machinery boost/move/utility.hpp move() and forward() boost/move/algorithm.hpp move(), uninitialized_move... boost/move/iterator.hpp move_iterator, back_move_insert_iterator, ... boost/move/traits.hpp has_trivial_destructor_after_move, has_nothrow_move boost/move/move.hpp includes all previous headers

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain Ion Gaztañaga.
The resolution will be deleted.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.