|
Boost Users : |
Subject: [Boost-users] [typeof] fails with Intel Compiler v11.0 on windows
From: Mikko Vainio (mikko.vainio_at_[hidden])
Date: 2009-01-09 13:52:31
Dear boosters,
Could someone out there verify that the following piece of code fails
with Intel Compiler v11.0.066 on Windows (Microsoft SDK v6.1):
---------------------
#include <boost/typeof/typeof.hpp>
#include <vector>
using namespace std;
int main(int argc, char* argv[])
{
vector< int > testvec;
BOOST_TYPEOF( testvec.begin() ) i = testvec.begin();
return 0;
}
---------------------
The compiler output is:
---------------------
using typeof emulation
C:\boost\include\boost-1_37\boost/typeof/encode_decode.hpp(50): error:
incomplete type is not allowed
struct encode_type :
BOOST_TYPEOF_ENCODE_NS_QUALIFIER::encode_type_impl<V, T>
^
detected during instantiation of class
"boost::type_of::encode_type<V, T> [with
V=boost::type_of::vector0<void>, T=std::_Vector_iterator<int,
std::allocator<int>>]" at line 9 of "typeoftest.cpp"
...
---------------------
Preprocessor output shows that encode_type_impl is indeed just
forward-declared before encode_type:
---------------------
#line 30 "C:\\boost\\include\\boost-1_37\\boost/typeof/encode_decode.hpp"
namespace { namespace boost_typeof {
template<class V, class Type_Not_Registered_With_Typeof_System>
struct encode_type_impl;
<snip>
}}
namespace boost { namespace type_of {
template<class V, class T>
struct encode_type : boost_typeof::encode_type_impl<V, T>
{};
template<class Iter>
struct decode_type : boost_typeof::decode_type_impl<
typename Iter::type,
typename Iter::next
>
{};
}}
---------------------
Is this a bug? Should a header containing the implementation of
encode_type_impl be included prior to encode_decode.hpp? Any help
appreciated.
Cheers,
Mikko
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