Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

PrevUpHomeNext

Struct template has_trivial_destructor_after_move

boost::has_trivial_destructor_after_move

Synopsis

// In header: <boost/move/traits.hpp>

template<typename T> 
struct has_trivial_destructor_after_move :
  public boost::has_trivial_destructor< T >
{
};

Description

If this trait yields to true (has_trivial_destructor_after_move <T>::value == true) means that if T is used as argument of a move construction/assignment, there is no need to call T's destructor. This optimization tipically is used to improve containers' performance.

By default this trait is true if the type has trivial destructor, every class should specialize this trait if it wants to improve performance when inserted in containers.


PrevUpHomeNext