Boost logo

Boost Users :

From: MOSS Sebastian (Sebastian.MOSS_at_[hidden])
Date: 2007-11-09 11:59:25


Ok, so the templated operator thing is a known issue; thanks Stjepan.

With ignoring the template keyword for msvc I still get compile errors
though. Removing 'const' from the operator declaration doesn't work; all
the objects passed to bind are copy constructible aswell. This compiles
fine on gcc 4.0.3

>From the error list it looks like some kind of substitution problem. The
'portable' syntax for boost::function doesn't seem to help either.

Any ideas on this 1?

s

> -----Original Message-----
> From: boost-users-bounces_at_[hidden] [mailto:boost-users-
> bounces_at_[hidden]] On Behalf Of Stjepan Rajko
> Sent: Thursday, November 08, 2007 7:10 PM
> To: boost-users_at_[hidden]
> Subject: Re: [Boost-users] [bind] binding templated operator with vs
7.1
>
> On Nov 8, 2007 4:20 PM, MOSS Sebastian <Sebastian.MOSS_at_[hidden]>
wrote:
> > Hi,
> >
> > I'm having trouble with the following design with vs 7.1 and
wondering
> if anyone could offer a workaround.
> >
> > Particularly it seems that the ".template operator" syntax isn't
liked.
> (This works on gcc 4.0.3). Removing the
> > 'template' keyword from the bind arguments gives an error novel.
> >
>
> I was having a similar issue with msvc8. Not sure what the underlying
> problem is but I ended up just using the template keyword
> conditionally for non-MSVC compilers. I.e., something like
>
> #include <boost/config.hpp>
> ...
>
> boost::bind(&bound::
> #ifndef BOOST_MSVC
> template
> #endif
> operator&<T>,
> instance,
> obj);
>
> It would probably be cleaner to define something like
> TEMPLATE_OPERATOR to template for non-msvc and to nothing for msvc,
> and use that instead. Maybe something like that is already defined
> somewhere.
>
> HTH,
>
> Stjepan
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
 
*******************************
This e-mail contains information for the intended recipient only. It may contain proprietary material or confidential information. If you are not the intended recipient you are not authorised to distribute, copy or use this e-mail or any attachment to it. Murex cannot guarantee that it is virus free and accepts no responsibility for any loss or damage arising from its use. If you have received this e-mail in error please notify immediately the sender and delete the original email received, any attachments and all copies from your system.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net