template<typename From, typename To, typename>
struct boost::hana::is_embedded< From, To, typename >
Returns whether a data type can be embedded into another data type.
Given two data types To
and From
, is_embedded<From, To>
returns whether From
is convertible to To
, and whether that conversion is also an embedding, as signaled by the embedding
type.
Example
static_assert(hana::is_embedded<int, long>{}, "");
static_assert(!hana::is_embedded<int, unsigned int long>{}, "");
static_assert(!hana::is_embedded<int, float>{}, "");
static_assert(hana::is_embedded<float, double>{}, "");
int main() { }
Defines boost::hana::to and related utilities.
Namespace containing everything in the library.
Definition: accessors.hpp:20
Inherits std::false_type.