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

This is the documentation for an old version of boost. Click here for the latest Boost documentation.
PrevUpHomeNext

Class aligned_delete

boost::alignment::aligned_delete

Synopsis

// In header: <boost/align/aligned_delete.hpp>


class aligned_delete {
public:

  // public member functions
  template<typename T> 
    void operator()(T *) const noexcept(BOOST_NOEXCEPT_EXPR(ptr->~T())));
};

Description

Class aligned_delete.

aligned_delete public member functions

  1. template<typename T> 
      void operator()(T * ptr) const noexcept(BOOST_NOEXCEPT_EXPR(ptr->~T())));

    Calls ~T() on ptr to destroy the object and then calls aligned_free on ptr to free the allocated memory.

    Note: If T is an incomplete type, the program is ill-formed.


PrevUpHomeNext