tetl
0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
convertible_to.hpp
Go to the documentation of this file.
1
// SPDX-License-Identifier: BSL-1.0
2
3
#ifndef TETL_CONCEPTS_CONVERTIBLE_TO_HPP
4
#define TETL_CONCEPTS_CONVERTIBLE_TO_HPP
5
6
#include <
etl/_type_traits/add_rvalue_reference.hpp
>
7
#include <
etl/_type_traits/is_convertible.hpp
>
8
9
namespace
etl
{
10
16
template
<
typename
From,
typename
To>
17
concept
convertible_to
18
=
etl::is_convertible_v<From, To>
and
requires
(etl::add_rvalue_reference_t<From> (&f)()) {
static_cast<
To
>
(f()); };
19
20
}
// namespace etl
21
22
#endif
// TETL_CONCEPTS_CONVERTIBLE_TO_HPP
add_rvalue_reference.hpp
etl::convertible_to
The concept convertible_to<From, To> specifies that an expression of the same type and value category...
Definition
convertible_to.hpp:18
is_convertible.hpp
etl
Definition
adjacent_find.hpp:8
etl::is_convertible_v
constexpr bool is_convertible_v
Definition
is_convertible.hpp:46
include
etl
_concepts
convertible_to.hpp
Generated on Sat Mar 8 2025 16:19:59 for tetl by
1.14.0