Boost logo

Boost Users :

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


Aha, you need to set FUSION_MAX_VECTOR_SIZE, as well. Must have
overlooked that in the documentation.

This works now:

#define FUSION_MAX_VECTOR_SIZE 20
#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;
}

Cool. I can proceed coding now.

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