Boost logo

Boost :

From: Joaquín Mª López Muñoz (joaquin_at_[hidden])
Date: 2004-06-10 04:35:35


Toon Knapen ha escrito:

> Joaquín Mª López Muñoz wrote:
>
> > Hi Toon, maybe we have advanced a little, since, if I'm ont wrong, the
> > error triggers at the second argument of the ctor. I've applied a
> > similar patch to this as well. Could you please try the attached file?
>
> This seems to solve the problem in the multi_index library ;-)

OK, I'll be commiting this patch to the Main CVS during this morning.
The workaround is ugly as sin, but I'm not much concerned as it is
strictly vacpp-specific. We can refine it later on.

> but now
> compilation is aborted due to errors encountered while including the
> tuple library in the multi_index library ;-(
>
> See the compiler-messages in attachment:
>

[...]

>
> "/home/tk/ext_projects/boost/boost_tknapen/boost/boost/tuple/detail/tuple_basic.hpp", line 214.12: 1540-0711 (S) Too few template arguments have been specified.

Well, the problem seems easy to fix, but it should be the author
of Boost.Tuple who has the last word on this. Looks like it only
takes replacing the following in boost/tuple/detail/tuple_basic.hpp

template<int N, class HT, class TT>
inline typename access_traits<
                  typename element<N, cons<HT, TT> >::type
>::non_const_type
get(cons<HT, TT>& c BOOST_APPEND_EXPLICIT_TEMPLATE_NON_TYPE(int, N)) {
  return detail::get_class<N>::BOOST_NESTED_TEMPLATE
         get<
           typename access_traits<
             typename element<N, cons<HT, TT> >::type
>::non_const_type>(c);
}

with

template<int N, class HT, class TT>
inline typename access_traits<
                  typename element<N, cons<HT, TT> >::type
>::non_const_type
get(cons<HT, TT>& c BOOST_APPEND_EXPLICIT_TEMPLATE_NON_TYPE(int, N)) {
  return detail::get_class<N>::BOOST_NESTED_TEMPLATE
         get<
           typename access_traits<
             typename element<N, cons<HT, TT> >::type
>::non_const_type,
           HT, TT // new line
>(c);
}

There are two places where the change should be done. Maybe you can
do the changes locally and see what happens.

Is this use case covered by Boost.Tuple tests? I wonder why it popped out
in the context of Boost.MultiIndex.

Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo


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