$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
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.