$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
From: Andy Little (andy_at_[hidden])
Date: 2004-07-03 21:08:07
"Doug Gregor" <dgregor_at_[hidden]> wrote
Ok I'm onto this and agree it looks rather cool....
template<typename T>
struct MyUDT;
template<typename Op,typename Ta, typename Tb>
struct result_of<Op(MyUDT<Ta>,MyUDT<Tb>) >{
typedef MyUDT< typename result_of<Op(Ta,Tb)>::type > type;
};
int main()
{
result_of< minus(int,double) >::type x;
}
--------
> If we had "smarter" versions of std::plus, std::minus, etc. that played
> well with result_of, I think that would solve the issue reasonably
> well.
This is the remaining problem. If there are to be these plus, minus
functors where are they to reside or will they be the old favourites?
regards
Andy Little