Boost logo

Boost :

From: Stefan Slapeta (stefan_nospam__at_[hidden])
Date: 2004-12-08 10:51:02


Hartmut Kaiser wrote:

> struct add_visitor : public ....
> {
> long operator()(long t1, long t2)
> {
> return t1 + t2;
> }
> template <typename T>
> unsigned long operator()(unsigned long t1, T t2)
> {
> return t1 + t2;
> }
> template <typename T>
> unsigned long operator()(T t1, unsigned long t2)
> {
> return t1 + t2;
> }
> };
>

BTW, the parameter mix you took here won't work this way. Unfortunately,
I've never got a binary visitor running without heavily using
enable_ifs! (I still don't understand what argument type is actually
passed to a visitor...)

Stefan


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk