tetl 0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
etl::convertible_to Concept Reference

The concept convertible_to<From, To> specifies that an expression of the same type and value category as those of declval<From>() can be implicitly and explicitly converted to the type To, and the two forms of conversion are equivalent. More...

#include <convertible_to.hpp>

Concept definition

template<typename From, typename To>
concept etl::convertible_to = etl::is_convertible_v<From, To> and requires(etl::add_rvalue_reference_t<From> (&f)()) { static_cast<To>(f()); }
The concept convertible_to<From, To> specifies that an expression of the same type and value category...
Definition convertible_to.hpp:18
constexpr bool is_convertible_v
Definition is_convertible.hpp:46

Detailed Description

The concept convertible_to<From, To> specifies that an expression of the same type and value category as those of declval<From>() can be implicitly and explicitly converted to the type To, and the two forms of conversion are equivalent.