template<typename From, typename To, typename>
struct boost::hana::is_convertible< From, To, typename >
Returns whether there is a Hana-conversion from a data type to another.
Specifically, is_convertible<From, To>
is whether calling to<To>
with an object of data type From
would not trigger a static assertion.
Example
struct Person { };
struct Employee : Person { };
static_assert(hana::is_convertible<Employee, Person>{}, "");
static_assert(!hana::is_convertible<Person, Employee>{}, "");
static_assert(hana::is_convertible<int, float>{}, "");
int main() { }
Inherits true_type.