My Project
Classes | Typedefs | Functions
is_nothrow_destructible.hpp File Reference
#include "bool_constant.hpp"
#include "declval.hpp"
#include "is_detected.hpp"
#include "is_function.hpp"
#include "is_reference.hpp"
#include "is_scalar.hpp"
#include "is_unbounded_array.hpp"
#include "is_void.hpp"
#include "remove_all_extents.hpp"
#include "true_type.hpp"
#include "false_type.hpp"

Go to the source code of this file.

Classes

class  bsl::is_nothrow_destructible< T >
 If the provided type is nothrow destructible, provides the member constant value equal to true. Otherwise the member constant value is false. More...
 

Typedefs

template<typename T >
using bsl::details::is_nothrow_destructible_type = decltype(bsl::declval< T & >().~T())
 used to detect the presence of a destructor in T
 

Functions

template<typename T >
auto bsl::details::destructor_is_marked_nothrow (bsl::int32 ignored) noexcept -> bool_constant< noexcept(bsl::declval< T & >().~T())>
 Tests if a destructor is marked noexcept or not. It does this by creating a function that returns true if T's destructor is marked noexcept, false otherwise. If T does not have a destructor, the other version of this function is selected by the compiler which always returns false. More...
 
template<typename T >
auto bsl::details::destructor_is_marked_nothrow (bool ignored) noexcept -> false_type
 Tests if a destructor is marked noexcept or not. It does this by creating a function that returns true if T's destructor is marked noexcept, false otherwise. If T does not have a destructor, the other version of this function is selected by the compiler which always returns false. More...
 
template<typename T >
constexpr bool bsl::details::check_is_nothrow_destructible () noexcept
 Checks if a type "T" is destructible and if so, returns true, otherwise returns false. More...
 

Detailed Description

Function Documentation

◆ destructor_is_marked_nothrow() [1/2]

template<typename T >
auto bsl::details::destructor_is_marked_nothrow ( bsl::int32  ignored) -> bool_constant< noexcept(bsl::declval< T & >().~T())>
noexcept

Tests if a destructor is marked noexcept or not. It does this by creating a function that returns true if T's destructor is marked noexcept, false otherwise. If T does not have a destructor, the other version of this function is selected by the compiler which always returns false.

Template Parameters
TThe type to query
Parameters
ignored(only used for overload resolution)
Returns
returns true if T is nothrow destructible, false otherwise

◆ destructor_is_marked_nothrow() [2/2]

template<typename T >
auto bsl::details::destructor_is_marked_nothrow ( bool  ignored) -> false_type
noexcept

Tests if a destructor is marked noexcept or not. It does this by creating a function that returns true if T's destructor is marked noexcept, false otherwise. If T does not have a destructor, the other version of this function is selected by the compiler which always returns false.

Template Parameters
TThe type to query
Parameters
ignored(only used for overload resolution)
Returns
returns true if T is nothrow destructible, false otherwise

◆ check_is_nothrow_destructible()

template<typename T >
constexpr bool bsl::details::check_is_nothrow_destructible ( )
noexcept

Checks if a type "T" is destructible and if so, returns true, otherwise returns false.

Template Parameters
Tthe type to query
Returns
If "T" is destructible, returns true, otherwise returns false.