Boost logo

Boost Users :

From: Christian Henning (chhenning_at_[hidden])
Date: 2007-03-20 14:30:11


Hi there, I'm experiencing problems when setting FUSION_MAX_MAP_SIZE
to 20. I'm getting a lot of compiler errors:

#define FUSION_MAX_MAP_SIZE 20

#include <string>

#include <boost/static_assert.hpp>
#include <boost/fusion/sequence.hpp>

using namespace std;
using namespace boost;

// Address contact
namespace address_fields
{
        struct _address_1_;
        struct _address_2_;
        struct _city_;
        struct _state_;
        struct _zip_;
        struct _country_;
        struct _phone_1_;
        struct _phone_2_;
        struct _email_1_;
        struct _email_2_;
        struct _fax_;
        struct _other_;
}

typedef fusion::map< fusion::pair< address_fields::_address_1_, string >
                   , fusion::pair< address_fields::_address_2_, string >
                   , fusion::pair< address_fields::_city_ , string >
                   , fusion::pair< address_fields::_state_ , string >
                   , fusion::pair< address_fields::_zip_ , string >
                   , fusion::pair< address_fields::_country_ , string >
                   , fusion::pair< address_fields::_phone_1_ , string >
                   , fusion::pair< address_fields::_phone_2_ , string >
                   , fusion::pair< address_fields::_email_1_ , string >
                   , fusion::pair< address_fields::_email_2_ , string >
                   , fusion::pair< address_fields::_fax_ , string >
                   , fusion::pair< address_fields::_other_ , string >
> address_type;

int _tmain(int argc, _TCHAR* argv[])
{
        return 0;
}

c:\boost\boost\fusion\sequence\container\map\map.hpp(41) : error
C2977: 'boost::fusion::vector' : too many template arguments
        c:\boost\boost\fusion\sequence\container\vector\vector.hpp(126)
: see declaration of 'boost::fusion::vector'
        c:\boost\boost\fusion\sequence\container\map\map.hpp(70) : see
reference to class template instantiation
'boost::fusion::map<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19>'
being compiled
c:\boost\boost\fusion\sequence\container\map\detail\map_lookup.hpp(31)
: error C3203: 'vector' : class template invalid as template argument
for template parameter 'Vector', expected a real type
        c:\boost\boost\fusion\sequence\container\map\detail\map_lookup.hpp(32)
: see reference to class template instantiation
'boost::fusion::map<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19>::meta_find_impl<Key,dummy>'
being compiled
c:\boost\boost\fusion\sequence\container\map\detail\map_lookup.hpp(37)
: error C3203: 'vector' : class template invalid as template argument
for template parameter 'Vector', expected a real type

[snip]

Any ideas,
Christian


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