Boost logo

Boost :

From: Felipe Magno de Almeida (felipe.m.almeida_at_[hidden])
Date: 2006-03-06 11:55:56


Hi,

I'm having a compiler error with gcc 3.4.4. It compiles cleanly with
VC7.1 and gcc4.1.
I'm using the CVS version of boost.
The code is:

header_decode_type and header_encode_type types dont really matter,
are just member variables that are passed to header constructor.

header headers::operator[](std::string const& name) const // line 57
{
  headers_multi_index_t::nth_index<1>::type const& index =
headers_set_.get<1>();
  return header(index.equal_range(name)
    , header_decode_handler_, header_encode_handler_);
}

The headers_multi_index_t is:

typedef std::pair<std::string, std::string> pair;
typedef mi::multi_index_container<pair
  , mi::indexed_by
    <
      mi::sequenced<>
      , mi::ordered_non_unique
        <
          BOOST_MULTI_INDEX_MEMBER(pair, std::string, first)
          , iless
>
>
> headers_multi_index_t;

And the header constructor is:

typedef std::pair<iterator, iterator> iterator_pair;
header(iterator_pair pair
    , header_decode_type const& header_decode_handler
    , header_encode_type const& header_encode_handler);

The error message is:

../src/headers.cpp: In member function `mail::header
mail::headers::operator[](const std::string&) const':
../../../libs/boost/boost/multi_index/detail/index_base.hpp:49: error:
`typedef struct
boost::multi_index::detail::index_node_base<mail::pair>
boost::multi_index::detail::index_base<mail::pair,
boost::multi_index::indexed_by<boost::multi_index::sequenced<boost::multi_index::tag<mpl_::na,
mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na,
mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na,
mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na> >,
boost::multi_index::ordered_non_unique<boost::multi_index::member<mail::pair,
std::string, &std::pair<std::string, std::string>::first>,
mail::iless, mpl_::na>, mpl_::na, mpl_::na, mpl_::na, mpl_::na,
mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na,
mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na>,
std::allocator<mail::pair> >::node_type' is protected
../src/headers.cpp:61: error: within this context

Any help would be greatly apreaciated,
best regards.

--
Felipe Magno de Almeida

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk