libhatchet
Loading...
Searching...
No Matches
hxconvertible_to Concept Reference

#include <hxkey.hpp>

Concept definition

template<typename from_t_, typename to_t_>
concept hxconvertible_to = requires(from_t_ (&&from_)()) {
requires requires { static_cast<to_t_>(from_()); };
}
hxconvertible_to - A concept that requires one type to be convertible to another.
Definition hxkey.hpp:41

Detailed Description

hxconvertible_to - A concept that requires one type to be convertible to another.

See usage below. The compiler applies some unintuitive rules when evaluating this.

  • from_t : The source type.
  • to_t : The target type.