|
Boost Users : |
From: Jeff Holle (jeffreyholle_at_[hidden])
Date: 2007-10-01 11:28:02
Once again, I've run into a compilation problem that I can't seem to fix
and I wish some help.
My multi_index container looks like:
typedef multi_index_container<
entry,
indexed_by<
ordered_unique<member<entry,DataVertex,&entry::m_vertex> >,
ordered_non_unique<
composite_key<
entry,
member<entry,size_t,&entry::m_y>,
member<entry,size_t,&entry::m_x>
>
>
>
> C;
I now have to swap values via the composite_key.
To simplify things, I'll just express the last of three lines that would
do this job if it compiles (and the lines needed to understand it).
c.get<1>().modify_key(c.get<1>().find(make_tuple(y,UINT_MAX)),ll::_1=make_tuple(y,startIter2->m_x));
where startIter2 type is:
nth_index<C,1>::type::iterator
and y is just an int.
The compiler error that I get is:
$BOOST_ROOT/boost/multi_index/detail/modify_key_adaptor.hpp: In member
function 'void boost::multi_index::detail::modify_key_adaptor<Modifier,
Value, KeyFromValue>::operator()(Value&) [with Modifier =
boost::lambda::lambda_functor<boost::lambda::lambda_functor_base<boost::lambda::other_action<boost::lambda::assignment_action>,
boost::tuples::tuple<boost::lambda::lambda_functor<boost::lambda::placeholder<1>
>, const boost::tuples::tuple<int, unsigned int,
boost::tuples::null_type, boost::tuples::null_type,
boost::tuples::null_type, boost::tuples::null_type,
boost::tuples::null_type, boost::tuples::null_type,
boost::tuples::null_type, boost::tuples::null_type>,
boost::tuples::null_type, boost::tuples::null_type,
boost::tuples::null_type, boost::tuples::null_type,
boost::tuples::null_type, boost::tuples::null_type,
boost::tuples::null_type, boost::tuples::null_type> > >, Value =
Positioner::entry, KeyFromValue =
boost::multi_index::composite_key<Positioner::entry,
boost::multi_index::member<Positioner::entry, unsigned int,
&Positioner::entry::m_y>, boost::multi_index::member<Positioner::entry,
unsigned int, &Positioner::entry::m_x>, boost::tuples::null_type,
boost::tuples::null_type, boost::tuples::null_type,
boost::tuples::null_type, boost::tuples::null_type,
boost::tuples::null_type, boost::tuples::null_type,
boost::tuples::null_type>]':
$BOOST_ROOT/boost/multi_index_container.hpp:543: instantiated from
'bool boost::multi_index::multi_index_container<Value,
IndexSpecifierList, Allocator>::modify_(Modifier, typename
boost::multi_index::detail::multi_index_base_type<Value,
IndexSpecifierList, Allocator>::type::node_type*) [with Modifier =
boost::multi_index::detail::modify_key_adaptor<boost::lambda::lambda_functor<boost::lambda::lambda_functor_base<boost::lambda::other_action<boost::lambda::assignment_action>,
boost::tuples::tuple<boost::lambda::lambda_functor<boost::lambda::placeholder<1>
>, const boost::tuples::tuple<int, unsigned int,
boost::tuples::null_type, boost::tuples::null_type,
boost::tuples::null_type, boost::tuples::null_type,
boost::tuples::null_type, boost::tuples::null_type,
boost::tuples::null_type, boost::tuples::null_type>,
boost::tuples::null_type, boost::tuples::null_type,
boost::tuples::null_type, boost::tuples::null_type,
boost::tuples::null_type, boost::tuples::null_type,
boost::tuples::null_type, boost::tuples::null_type> > >,
Positioner::entry, boost::multi_index::composite_key<Positioner::entry,
boost::multi_index::member<Positioner::entry, unsigned int,
&Positioner::entry::m_y>, boost::multi_index::member<Positioner::entry,
unsigned int, &Positioner::entry::m_x>, boost::tuples::null_type,
boost::tuples::null_type, boost::tuples::null_type,
boost::tuples::null_type, boost::tuples::null_type,
boost::tuples::null_type, boost::tuples::null_type,
boost::tuples::null_type> >, Value = Positioner::entry,
IndexSpecifierList =
boost::multi_index::indexed_by<boost::multi_index::ordered_unique<boost::multi_index::member<Positioner::entry,
unsigned int, &Positioner::entry::m_vertex>, mpl_::na, mpl_::na>,
boost::multi_index::ordered_non_unique<boost::multi_index::composite_key<Positioner::entry,
boost::multi_index::member<Positioner::entry, unsigned int,
&Positioner::entry::m_y>, boost::multi_index::member<Positioner::entry,
unsigned int, &Positioner::entry::m_x>, boost::tuples::null_type,
boost::tuples::null_type, boost::tuples::null_type,
boost::tuples::null_type, boost::tuples::null_type,
boost::tuples::null_type, boost::tuples::null_type,
boost::tuples::null_type>, 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>, Allocator = std::allocator<Positioner::entry>]'
$BOOST_ROOT/boost/multi_index/detail/index_base.hpp:166: instantiated
from 'bool boost::multi_index::detail::index_base<Value,
IndexSpecifierList, Allocator>::final_modify_(Modifier, typename
boost::multi_index::detail::multi_index_node_type<Value,
IndexSpecifierList, Allocator>::type*) [with Modifier =
boost::multi_index::detail::modify_key_adaptor<boost::lambda::lambda_functor<boost::lambda::lambda_functor_base<boost::lambda::other_action<boost::lambda::assignment_action>,
boost::tuples::tuple<boost::lambda::lambda_functor<boost::lambda::placeholder<1>
>, const boost::tuples::tuple<int, unsigned int,
boost::tuples::null_type, boost::tuples::null_type,
boost::tuples::null_type, boost::tuples::null_type,
boost::tuples::null_type, boost::tuples::null_type,
boost::tuples::null_type, boost::tuples::null_type>,
boost::tuples::null_type, boost::tuples::null_type,
boost::tuples::null_type, boost::tuples::null_type,
boost::tuples::null_type, boost::tuples::null_type,
boost::tuples::null_type, boost::tuples::null_type> > >,
Positioner::entry, boost::multi_index::composite_key<Positioner::entry,
boost::multi_index::member<Positioner::entry, unsigned int,
&Positioner::entry::m_y>, boost::multi_index::member<Positioner::entry,
unsigned int, &Positioner::entry::m_x>, boost::tuples::null_type,
boost::tuples::null_type, boost::tuples::null_type,
boost::tuples::null_type, boost::tuples::null_type,
boost::tuples::null_type, boost::tuples::null_type,
boost::tuples::null_type> >, Value = Positioner::entry,
IndexSpecifierList =
boost::multi_index::indexed_by<boost::multi_index::ordered_unique<boost::multi_index::member<Positioner::entry,
unsigned int, &Positioner::entry::m_vertex>, mpl_::na, mpl_::na>,
boost::multi_index::ordered_non_unique<boost::multi_index::composite_key<Positioner::entry,
boost::multi_index::member<Positioner::entry, unsigned int,
&Positioner::entry::m_y>, boost::multi_index::member<Positioner::entry,
unsigned int, &Positioner::entry::m_x>, boost::tuples::null_type,
boost::tuples::null_type, boost::tuples::null_type,
boost::tuples::null_type, boost::tuples::null_type,
boost::tuples::null_type, boost::tuples::null_type,
boost::tuples::null_type>, 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>, Allocator = std::allocator<Positioner::entry>]'
$BOOST_ROOT/boost/multi_index/ordered_index.hpp:338: instantiated from
'bool boost::multi_index::detail::ordered_index<KeyFromValue, Compare,
SuperMeta, TagList,
Category>::modify(boost::multi_index::detail::bidir_node_iterator<boost::multi_index::detail::ordered_index_node<typename
SuperMeta::type::node_type>, mpl_::na>, Modifier) [with Modifier =
boost::multi_index::detail::modify_key_adaptor<boost::lambda::lambda_functor<boost::lambda::lambda_functor_base<boost::lambda::other_action<boost::lambda::assignment_action>,
boost::tuples::tuple<boost::lambda::lambda_functor<boost::lambda::placeholder<1>
>, const boost::tuples::tuple<int, unsigned int,
boost::tuples::null_type, boost::tuples::null_type,
boost::tuples::null_type, boost::tuples::null_type,
boost::tuples::null_type, boost::tuples::null_type,
boost::tuples::null_type, boost::tuples::null_type>,
boost::tuples::null_type, boost::tuples::null_type,
boost::tuples::null_type, boost::tuples::null_type,
boost::tuples::null_type, boost::tuples::null_type,
boost::tuples::null_type, boost::tuples::null_type> > >,
Positioner::entry, boost::multi_index::composite_key<Positioner::entry,
boost::multi_index::member<Positioner::entry, unsigned int,
&Positioner::entry::m_y>, boost::multi_index::member<Positioner::entry,
unsigned int, &Positioner::entry::m_x>, boost::tuples::null_type,
boost::tuples::null_type, boost::tuples::null_type,
boost::tuples::null_type, boost::tuples::null_type,
boost::tuples::null_type, boost::tuples::null_type,
boost::tuples::null_type> >, KeyFromValue =
boost::multi_index::composite_key<Positioner::entry,
boost::multi_index::member<Positioner::entry, unsigned int,
&Positioner::entry::m_y>, boost::multi_index::member<Positioner::entry,
unsigned int, &Positioner::entry::m_x>, boost::tuples::null_type,
boost::tuples::null_type, boost::tuples::null_type,
boost::tuples::null_type, boost::tuples::null_type,
boost::tuples::null_type, boost::tuples::null_type,
boost::tuples::null_type>, Compare =
std::less<boost::multi_index::composite_key_result<boost::multi_index::composite_key<Positioner::entry,
boost::multi_index::member<Positioner::entry, unsigned int,
&Positioner::entry::m_y>, boost::multi_index::member<Positioner::entry,
unsigned int, &Positioner::entry::m_x>, boost::tuples::null_type,
boost::tuples::null_type, boost::tuples::null_type,
boost::tuples::null_type, boost::tuples::null_type,
boost::tuples::null_type, boost::tuples::null_type,
boost::tuples::null_type> > >, SuperMeta =
boost::multi_index::detail::nth_layer<2, Positioner::entry,
boost::multi_index::indexed_by<boost::multi_index::ordered_unique<boost::multi_index::member<Positioner::entry,
unsigned int, &Positioner::entry::m_vertex>, mpl_::na, mpl_::na>,
boost::multi_index::ordered_non_unique<boost::multi_index::composite_key<Positioner::entry,
boost::multi_index::member<Positioner::entry, unsigned int,
&Positioner::entry::m_y>, boost::multi_index::member<Positioner::entry,
unsigned int, &Positioner::entry::m_x>, boost::tuples::null_type,
boost::tuples::null_type, boost::tuples::null_type,
boost::tuples::null_type, boost::tuples::null_type,
boost::tuples::null_type, boost::tuples::null_type,
boost::tuples::null_type>, 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>, std::allocator<Positioner::entry> >, TagList =
boost::mpl::vector0<mpl_::na>, Category =
boost::multi_index::detail::ordered_non_unique_tag]'
$BOOST_ROOT/boost/multi_index/ordered_index.hpp:349: instantiated from
'bool boost::multi_index::detail::ordered_index<KeyFromValue, Compare,
SuperMeta, TagList,
Category>::modify_key(boost::multi_index::detail::bidir_node_iterator<boost::multi_index::detail::ordered_index_node<typename
SuperMeta::type::node_type>, mpl_::na>, Modifier) [with Modifier =
boost::lambda::lambda_functor<boost::lambda::lambda_functor_base<boost::lambda::other_action<boost::lambda::assignment_action>,
boost::tuples::tuple<boost::lambda::lambda_functor<boost::lambda::placeholder<1>
>, const boost::tuples::tuple<int, unsigned int,
boost::tuples::null_type, boost::tuples::null_type,
boost::tuples::null_type, boost::tuples::null_type,
boost::tuples::null_type, boost::tuples::null_type,
boost::tuples::null_type, boost::tuples::null_type>,
boost::tuples::null_type, boost::tuples::null_type,
boost::tuples::null_type, boost::tuples::null_type,
boost::tuples::null_type, boost::tuples::null_type,
boost::tuples::null_type, boost::tuples::null_type> > >, KeyFromValue =
boost::multi_index::composite_key<Positioner::entry,
boost::multi_index::member<Positioner::entry, unsigned int,
&Positioner::entry::m_y>, boost::multi_index::member<Positioner::entry,
unsigned int, &Positioner::entry::m_x>, boost::tuples::null_type,
boost::tuples::null_type, boost::tuples::null_type,
boost::tuples::null_type, boost::tuples::null_type,
boost::tuples::null_type, boost::tuples::null_type,
boost::tuples::null_type>, Compare =
std::less<boost::multi_index::composite_key_result<boost::multi_index::composite_key<Positioner::entry,
boost::multi_index::member<Positioner::entry, unsigned int,
&Positioner::entry::m_y>, boost::multi_index::member<Positioner::entry,
unsigned int, &Positioner::entry::m_x>, boost::tuples::null_type,
boost::tuples::null_type, boost::tuples::null_type,
boost::tuples::null_type, boost::tuples::null_type,
boost::tuples::null_type, boost::tuples::null_type,
boost::tuples::null_type> > >, SuperMeta =
boost::multi_index::detail::nth_layer<2, Positioner::entry,
boost::multi_index::indexed_by<boost::multi_index::ordered_unique<boost::multi_index::member<Positioner::entry,
unsigned int, &Positioner::entry::m_vertex>, mpl_::na, mpl_::na>,
boost::multi_index::ordered_non_unique<boost::multi_index::composite_key<Positioner::entry,
boost::multi_index::member<Positioner::entry, unsigned int,
&Positioner::entry::m_y>, boost::multi_index::member<Positioner::entry,
unsigned int, &Positioner::entry::m_x>, boost::tuples::null_type,
boost::tuples::null_type, boost::tuples::null_type,
boost::tuples::null_type, boost::tuples::null_type,
boost::tuples::null_type, boost::tuples::null_type,
boost::tuples::null_type>, 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>, std::allocator<Positioner::entry> >, TagList =
boost::mpl::vector0<mpl_::na>, Category =
boost::multi_index::detail::ordered_non_unique_tag]'
Can somebody point out whats wrong?
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