Struct default_delete< T[]>

Synopsis

#include <include/EASTL/internal/smart_ptr.h>

template <typename T>
struct default_delete<T[]> // Specialization for arrays.

Description

No description yet.

Methods

default_delete overload
operator()

Source

Lines 169-183 in include/EASTL/internal/smart_ptr.h.

template <typename T>
struct default_delete<T[]> // Specialization for arrays.
{
    #if defined(EA_COMPILER_GNUC) && (EA_COMPILER_VERSION <= 4006) // GCC prior to 4.7 has a bug with noexcept here.
        EA_CONSTEXPR default_delete() = default;
    #else
        EA_CONSTEXPR default_delete() EA_NOEXCEPT = default;
    #endif
    template <typename U> // This ctor is enabled if T is equal to or a base of U, and if U is less or equal const/volatile-qualified than T.
    default_delete(const default_delete<U[]>&, typename eastl::enable_if<Internal::is_array_cv_convertible<U*, T*>::value>::type* = 0) EA_NOEXCEPT {}
    void operator()(T* p) const EA_NOEXCEPT
        { delete[] p; }
};





Add Discussion as Guest

Log in