template<typename Context, typename Expected, typename... OtherExpected>
struct hi::v1::is_forward_of< Context, Expected, OtherExpected >
Is context a form of the expected type.
The context matched the expected type when:
- expected is a non-reference type and the decayed context is the same type, or derived from expected.
- expected is a pointer, shared_ptr, weak_ptr or unique_ptr and the context is convertible to expected.
- expected is in the form of
Result(Arguments...)
and the context is convertible to expected.
- expected is a observer and the context is convertible to expected.
- multiple expected are
or
-ed together
Examples of forward_of
concept which is created from is_forward_of
:
}
}
}
void foo(forward_of<std::string *> auto &&ptr) {
}
}
True if T is a forwarded type of Forward.
Definition concepts.hpp:137
- Template Parameters
-
Context | The template argument of a forwarding function argument. |
Expected | The type expected that matched a decayed-context. |
OtherExpected | optional other expected types which may match the decayed-context. |