|
Boost Users : |
From: John Henry (jpmythic_at_[hidden])
Date: 2004-09-28 20:09:01
The basics:
New to boost. Converting a project from VC7 to VC8 that uses Lambda
functionality.
Other issue, (I didn't write this code... so still learning it).
The problem:
-----------
The original compiles in earlier compilers, but comes up with "Ambiguous"
error in VC8.
The original code doesn't deal with Issues with MSVC compiliers, this I
found in my searches.
The fix from the Searches, points me to using the following workaround:
(This was posted on both boost.org and ASPN)
http://aspn.activestate.com/ASPN/Mail/Message/1387917
Now I get the basics, but I am still not quite sure about the whole boost
structure, so heres
the code I am dealing with. 4 files, so not too bad, and only in a small
section.
I've got the Basic's, I am just not sure how to conver this over:
[code]
template< class T >
struct Holder { T value; };
typedef InheritMultiple
<
//MythicDebug
--> list< int, std::string, Widget >,
--> lambda< Holder< _ > >::type
--> >::type myWidgetInfo;
} // inheritance
[/code]
The part --> list<...
is where I am unsure of how to convert it over to the style in the above
post:
[code]
------ (snipped) ------
typedef ownership type;
BOOST_MPL_AUX_LAMBDA_SUPPORT(1, ownership, (T))
[/code]
The compile error comes in about the lambda< Holder<_> >::type
[code]
Test.cpp(47) : error C2872: 'lambda' : ambiguous symbol
could be '\boost\boost\mpl\aux_\preprocessed\plain\full_lambda.hpp(27) :
boost::mpl::lambda'
or 'boost::mpl'
[/code]
Now I have tried changing it to:
boost::mpl< Holder...
boost::mpl::lambda< Holder..
All of those just give me other errors, even worse in number..
As far as I can tell I need to use the MSVC Compilier workaround to fix
this...
This is the last fix I need to start testing the code as I've managed to
convert/fix the rest..
I am just not sure how to convert
[ list< int... ]
to [ BOOST_MPL_AUX_LAMBDA_SUPPORT(1, ownership, (T)) ]
Thanks,
John Henry
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