std::convertible_to - cppreference.com (original) (raw)

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

[edit] Semantic requirements

convertible_to<From, To> is modeled only if, given a function fun of type std::add_rvalue_reference_t<From>() such that the expression fun() is equality-preserving,

[edit] Equality preservation

Expressions declared in requires expressions of the standard library concepts are required to be equality-preserving (except where stated otherwise).

[edit] References

[edit] See also