Does your library define just traits or try to emulate Concept Lite?
I'm not quite sure what you are asking. The library doesn't do everything
that
Concepts Lite does. It lets you define concept-like predicates(commonly
called a
type trait in C++) in a similiar manner as Concepts Lite does. It does do
template constraints as well, but this is just done using `enable_if`. Also,
it
won't resolve ambiguity between overloads like Concepts Lite does. However,
I am
thinking about implementing a mechanism for this. Perhaps something like
this:
struct advance1
{
template<class Iterator>
TICK_OVERLOAD_REQUIRES(is_random_access_iterator<Iterator>);
template<class Iterator>
void operator()(Iterator& it, int n) const
{
it += n;
}
};
struct advance2
{
template<class Iterator>
TICK_OVERLOAD_REQUIRES(is_input_iterator<Iterator>);
template<class Iterator>
void operator()(Iterator& it, int n) const
{
while (n--) ++it;
}
};
tick::overload