template<class Concept, class T>
singleton boost::type_erasure::param< Concept, T >
A wrapper to help with overload resolution for functions operating on an any.
The template arguments are interpreted in the same way as any.
A parameter of type param can be initialized with an any that has the same Concept
and base placeholder when there exists a corresponding standard conversion for the placeholder. A conversion sequence from any<C, P> to param<C, P1> is a better conversion sequence than any<C, P> to param<C, P2> iff the corresponding placeholder standard conversion sequence from P to P1 is a better conversion sequence than P to P2.
- Note
- Overloading based on cv-qualifiers and rvalue-ness is only supported in C++11. In C++03, all conversion sequences from any to param have the same rank.
Example:
void f(param<C, _a&>);
void f(param<C, const _a&>);
void g(param<C, const _a&>);
void g(param<C, _a&&>);
f(any<C, _a>());
g(any<C, _a>());