My Project
Classes | Functions
is_nothrow_convertible.hpp File Reference
#include "bool_constant.hpp"
#include "declval.hpp"
#include "false_type.hpp"
#include "is_void.hpp"
#include "true_type.hpp"

Go to the source code of this file.

Classes

class  bsl::is_nothrow_convertible< From, To >
 If the provided type is convertible from "From" to "To", provides the member constant value equal to true. Otherwise the member constant value is false. More...
 

Functions

template<typename T >
auto bsl::details::test_is_nothrow_convertible1 (bsl::int32 ignored) noexcept -> true_type_for< T()>
 Tests if the provided type is returnable, which is required for a type to be convertible. If the type is returnable, this returns true, false otherwise. More...
 
template<typename T >
auto bsl::details::test_is_nothrow_convertible1 (bool ignored) noexcept -> false_type
 Tests if the provided type is returnable, which is required for a type to be convertible. If the type is returnable, this returns true, false otherwise. More...
 
template<typename From , typename To >
auto bsl::details::test_is_nothrow_convertible2 (bsl::int32 ignored) noexcept -> bool_constant< noexcept(declval< void(&)(To) noexcept >()(declval< From >()))>
 Tests whether or not the provided to can be converted from "From" to "To" via a function parameter similar to an implicit conversion constructor (but might be implicitly provided by the compiler). If the type is convertible, this returns true, false otherwise. More...
 
template<typename From , typename To >
auto bsl::details::test_is_nothrow_convertible2 (bool ignored) noexcept -> false_type
 Tests whether or not the provided to can be converted from "From" to "To" via a function parameter similar to an implicit conversion constructor (but might be implicitly provided by the compiler). If the type is convertible, this returns true, false otherwise. More...
 
template<typename From , typename To >
constexpr bool bsl::details::check_is_nothrow_convertible () noexcept
 Performs all of the tests including testing if both types are void. More...
 

Detailed Description

Function Documentation

◆ test_is_nothrow_convertible1() [1/2]

template<typename T >
auto bsl::details::test_is_nothrow_convertible1 ( bsl::int32  ignored) -> true_type_for< T()>
noexcept

Tests if the provided type is returnable, which is required for a type to be convertible. If the type is returnable, this returns true, false otherwise.

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

◆ test_is_nothrow_convertible1() [2/2]

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

Tests if the provided type is returnable, which is required for a type to be convertible. If the type is returnable, this returns true, false otherwise.

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

◆ test_is_nothrow_convertible2() [1/2]

template<typename From , typename To >
auto bsl::details::test_is_nothrow_convertible2 ( bsl::int32  ignored) -> bool_constant< noexcept(declval< void(&)(To) noexcept >()(declval< From >()))>
noexcept

Tests whether or not the provided to can be converted from "From" to "To" via a function parameter similar to an implicit conversion constructor (but might be implicitly provided by the compiler). If the type is convertible, this returns true, false otherwise.

Template Parameters
Fromthe type to convert to
Tothe type to convert from
Parameters
ignored(only used for overload resolution)
Returns
returns true if T is returnable, false otherwise

◆ test_is_nothrow_convertible2() [2/2]

template<typename From , typename To >
auto bsl::details::test_is_nothrow_convertible2 ( bool  ignored) -> false_type
noexcept

Tests whether or not the provided to can be converted from "From" to "To" via a function parameter similar to an implicit conversion constructor (but might be implicitly provided by the compiler). If the type is convertible, this returns true, false otherwise.

Template Parameters
Fromthe type to convert to
Tothe type to convert from
Parameters
ignored(only used for overload resolution)
Returns
returns true if T is returnable, false otherwise

◆ check_is_nothrow_convertible()

template<typename From , typename To >
constexpr bool bsl::details::check_is_nothrow_convertible ( )
noexcept

Performs all of the tests including testing if both types are void.

Template Parameters
Fromthe type to convert to
Tothe type to convert from
Returns
returns true if T is returnable, false otherwise