Hi,
I am trying to get the type of the first element in a fusion vector
using mpl::at_c. This seems simple enough.
// Here is the code
#include
#include
int main()
{
typedef boost::fusion::vector VectorType;
typedef boost::mpl::at_c::type value0;
return 0;
}
This won't compile on vc-8.0, and I get the following error message:
...patience...
...found 467 targets...
...updating 2 targets...
msvc.compile.c++ bin\msvc-8.0\debug\example2.obj
example2.cpp
using native typeof
boost\boost/mpl/begin_end.hpp(35) : error C2903: 'apply' : symbol is
neither a class template nor a function template
boost\boost/mpl/aux_/at_impl.hpp(33) : see reference to class
template instantiation 'boost::mpl::begin<Sequence>' being compiled
with
[
Sequence=VectorType
]
boost\boost/mpl/at.hpp(45) : see reference to class template
instantiation 'boost::mpl::at_impl<Tag>::apply' being
compiled
with
[
Tag=boost::fusion::fusion_sequence_tag,
Sequence=VectorType,
N=boost::mpl::long_<0>
]
examples\example2.cpp(11) : see reference to class template
instantiation 'boost::mpl::at_c' being compiled
with
[
Sequence=VectorType,
N=0
]
boost\boost/mpl/begin_end.hpp(35) : error C2027: use of undefined type
'boost::mpl::begin_implboost::fusion::fusion_sequence_tag'
boost\boost/mpl/begin_end.hpp(35) : error C2059: syntax error : '<'
boost\boost/mpl/begin_end.hpp(35) : error C2039: 'type' : is not a
member of '`global namespace''
boost\boost/mpl/begin_end.hpp(35) : error C2238: unexpected token(s)
preceding ';'
boost\boost/mpl/aux_/at_impl.hpp(33) : error C2039: 'type' : is not a
member of 'boost::mpl::begin<Sequence>'
with
[
Sequence=VectorType
]
boost\boost/mpl/aux_/at_impl.hpp(34) : error C2146: syntax error :
missing ',' before identifier 'type'
boost\boost/mpl/aux_/at_impl.hpp(34) : error C2065: 'type' :
undeclared identifier
boost\boost/mpl/aux_/at_impl.hpp(35) : error C2955:
'boost::mpl::advance' : use of class template requires template
argument list
boost\boost/mpl/advance.hpp(60) : see declaration of
'boost::mpl::advance'
boost\boost/mpl/aux_/at_impl.hpp(35) : error C2039: 'type' : is not a
member of 'boost::mpl::advance'
boost\boost/mpl/advance.hpp(60) : see declaration of
'boost::mpl::advance'
boost\boost/mpl/aux_/at_impl.hpp(35) : error C2146: syntax error :
missing ';' before identifier 'iter_'
boost\boost/mpl/aux_/at_impl.hpp(35) : error C4430: missing type
specifier - int assumed. Note: C++ does not support default-int
boost\boost/mpl/aux_/at_impl.hpp(35) : error C4430: missing type
specifier - int assumed. Note: C++ does not support default-int
boost\boost/mpl/aux_/at_impl.hpp(37) : error C2065: 'iter_' :
undeclared identifier
boost\boost/mpl/aux_/at_impl.hpp(37) : error C2955:
'boost::mpl::deref' : use of class template requires template argument
list
boost\boost/mpl/deref.hpp(35) : see declaration of 'boost::mpl::deref'
boost\boost/mpl/aux_/at_impl.hpp(37) : error C2371:
'boost::mpl::at_impl<Tag>::apply::type' : redefinition;
different basic types
with
[
Tag=boost::fusion::fusion_sequence_tag,
Sequence=VectorType,
N=boost::mpl::long_<0>
]
boost\boost/mpl/aux_/at_impl.hpp(35) : see declaration of
'boost::mpl::at_impl<Tag>::apply::type'
with
[
Tag=boost::fusion::fusion_sequence_tag,
Sequence=VectorType,
N=boost::mpl::long_<0>
]
call "C:\Program Files\Microsoft Visual Studio 8\VC\vcvarsall.bat" x86 >nul
cl /Zm800 -nologo -TP /Z7 /Od /Ob0 /W3 /GR /MDd /Zc:forScope
/Zc:wchar_t /wd4675 /EHs @"bin\msvc-8.0\debug\example2.obj.rsp" -c
-Fo"bin\msvc-8.0\debug\example2.obj"
...failed msvc.compile.c++ bin\msvc-8.0\debug\example2.obj...
...skipped example2.exe for lack of
example2.obj...
...failed updating 1 target...
...skipped 1 target...