J
James Aguilar
I want to choose between using less and less_equal based on a boolean, but I
don't want to type the argument list twice. So I try to do something like the
following:
{
//...
binary_function<Date, Date, bool> &fn(inclusive ? less_equal<Date>()
: less<Date>());
return fn(d1, d2);
}
Assume that d1 and d2 are dates. How would one actually do this, as this causes
a syntax error: Error 1 error C2446: ':' : no conversion from 'std::less<_Ty>'
to 'std::less_equal<_Ty>' c:\docs\wkspc\vs\lab7\lab7\timedevent.cpp 59.
- JFA1
don't want to type the argument list twice. So I try to do something like the
following:
{
//...
binary_function<Date, Date, bool> &fn(inclusive ? less_equal<Date>()
: less<Date>());
return fn(d1, d2);
}
Assume that d1 and d2 are dates. How would one actually do this, as this causes
a syntax error: Error 1 error C2446: ':' : no conversion from 'std::less<_Ty>'
to 'std::less_equal<_Ty>' c:\docs\wkspc\vs\lab7\lab7\timedevent.cpp 59.
- JFA1