|
Boost : |
From: Peter Dimov (pdimov_at_[hidden])
Date: 2003-06-13 06:00:13
Alex Chovanec wrote:
>
> I suppose for starters, you could create a generic binary function for
> operator< and other operators, maybe something like this:
>
> template <typename T>
> struct ptr_less
> {
> bool operator()(const T * lhs, const T * rhs)
> {
> return (*lhs < *rhs);
> }
> };
More like
struct ptr_less
{
template <typename T>
bool operator()(T * lhs, T * rhs)
{
return *lhs < *rhs;
}
};
or *_1 < *_2.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk