tetl 0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
is_nothrow_convertible.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: BSL-1.0
2
3#ifndef TETL_TYPE_TRAITS_IS_NOTHROW_CONVERTIBLE_HPP
4#define TETL_TYPE_TRAITS_IS_NOTHROW_CONVERTIBLE_HPP
5
6#include <etl/_config/all.hpp>
7
12
13namespace etl {
14
15template <typename From, typename To>
16struct is_nothrow_convertible : bool_constant<is_void_v<From> && is_void_v<To>> { };
17
18template <typename From, typename To>
19 requires requires {
20 static_cast<To (*)()>(nullptr);
22 }
23struct is_nothrow_convertible<From, To> : true_type { };
24
25template <typename From, typename To>
27
28} // namespace etl
29
30#endif // TETL_TYPE_TRAITS_IS_NOTHROW_CONVERTIBLE_HPP
Definition adjacent_find.hpp:8
auto declval() noexcept -> add_rvalue_reference_t< T >
bool_constant< true > true_type
Definition bool_constant.hpp:13
integral_constant< bool, B > bool_constant
Definition bool_constant.hpp:11
constexpr bool is_nothrow_convertible_v
Definition is_nothrow_convertible.hpp:26
static constexpr bool value
Definition integral_constant.hpp:10
Definition is_nothrow_convertible.hpp:16