Re: [Boost-users] [bind] binding templated operator with vs 7.1
On Nov 8, 2007 4:20 PM, MOSS Sebastian
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
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.
-----Original Message----- From: boost-users-bounces@lists.boost.org [mailto:boost-users- bounces@lists.boost.org] On Behalf Of Stjepan Rajko Sent: Thursday, November 08, 2007 7:10 PM To: boost-users@lists.boost.org Subject: Re: [Boost-users] [bind] binding templated operator with vs 7.1
On Nov 8, 2007 4:20 PM, MOSS Sebastian
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
Any ideas on this 1? s 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::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@lists.boost.org 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.
participants (2)
-
MOSS Sebastian
-
Stjepan Rajko