From: Minmin Gong (gongminmin_at_[hidden])
Date: 2007-05-14 21:36:22
Eric Niebler wrote:
> Arkadiy Vertleyb wrote:
>> "Minmin Gong" <gongminmin_at_[hidden]> wrote
>>> It seems that BOOSTTYPEOF in 1.34 doesn't work in VC8. I try to copy
>>> boost\typeof\msvc\typeof_impl.hpp and boost\typeof\typeof.hpp from CVS
>>> HEAD to 1.34 and it works. Did I do something wrong or there is a bug?
>> I suspect you might be trying to use the MSVC "native" mode, which is
>> available in head but not in 1.34.0. Look for the "using typeof
>> emulation/native typeof" compiler message. Which one is it?
>> In 1.34.0 you have to use emulation mode with vc8.0. It is supposed to be
>> used by default. Did you by any chance define BOOST_TYPEOF_NATIVE?
> Or perhaps you didn't register your types, which is required in 1.34,
> but not in the version currently in CVS. We can't know unless you supply
> code that reproduces your error.
Thanks for your reply. This is my test code:
using namespace std;
BOOST_FOREACH(BOOST_TYPEOF(v)::reference i, v)
cout << i << endl;
The compile output is:
using typeof emulation
d:\boost\boost\typeof\encode_decode.hpp(47) : error C2504:
: base class undefined
d:\test\testtypeof\testtypeof.cpp(17) : see reference to class
template instantiation 'boost::type_of::encode_type<V,T>' being compiled
Do I need to register types such as std::vector, boost::array, etc. myself?
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk