Boost logo

Boost :

From: Joaquín Mª López Muñoz (joaquin_at_[hidden])
Date: 2004-09-27 07:37:19


Seems like the problem is solved by mpl::-qualifying
all occurrences of arg in boost/mpl/aux_/preprocessed/gcc/bind.hpp.
Interestingly, most of these were already qualified, there were
only two left.

I've attached a patch, though I guess it is not directly applicable
as this file is automatically generated. At least, I guess it can
shed some light on the problem. HTH.

PS: Volodya, could you verify if this solves your problem with
multi_index (locally)? Thank you.

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

Joaquín Mª López Muñoz ha escrito:

> This is a distilled form of the problem Vladimir found in
> http://tinyurl.com/3zsha
>
> The attached snippet fails with the latest CVS image in
> GCC 3.2 (see err.out). If I comment the first line
>
> #include <boost/bind/arg.hpp> // comment to get it working
>
> the snippet works OK. Also, the code works fine for Boost 1.31,
> (by previously replacing reverse_iter_fold with
> iter_fold_backward, of course) regardless of wether I comment or
> not the first line.
>
> Joaquín M López Muñoz
> Telefónica, Investigación y Desarrollo
>
> ------------------------------------------------------------------------
> Name: foo.cpp
> foo.cpp Type: Archivo de código fuente de C++ (application/x-unknown-content-type-cppfile)
> Encoding: base64
>
> ------------------------------------------------------------------------
> foo.cpp: In instantiation of `f1::apply<mpl_::_2, mpl_::_1>':
> /usr/local/boost_1_32_alpha/boost/mpl/aux_/preprocessed/gcc/bind.hpp:205: instantiated from `boost::mpl::apply_wrap2<f1, mpl_::_2, mpl_::_1>'
> /usr/local/boost_1_32_alpha/boost/mpl/aux_/preprocessed/gcc/bind.hpp:205: instantiated from `boost::mpl::bind2<f1, mpl_::_2, mpl_::_1>::apply<int, boost::mpl::v_iter<f3, 3>, mpl_::na, mpl_::na, mpl_::na>'
> /usr/local/boost_1_32_alpha/boost/mpl/aux_/preprocessed/gcc/reverse_iter_fold_impl.hpp:140: instantiated from `boost::mpl::apply_wrap2<boost::mpl::bind2<f1, mpl_::_2, mpl_::_1>, int, boost::mpl::v_iter<f3, 3> >'
> /usr/local/boost_1_32_alpha/boost/mpl/aux_/preprocessed/gcc/reverse_iter_fold_impl.hpp:140: instantiated from `boost::mpl::apply2<boost::mpl::bind2<f1, mpl_::_2, mpl_::_1>, int, boost::mpl::v_iter<f3, 3> >'
> /usr/local/boost_1_32_alpha/boost/mpl/aux_/preprocessed/gcc/reverse_iter_fold_impl.hpp:140: instantiated from `boost::mpl::aux::reverse_iter_fold_impl<4, boost::mpl::v_iter<f3, 0>, boost::mpl::v_iter<f3, 4>, int, boost::mpl::bind2<f1, mpl_::_2, mpl_::_1>, boost::mpl::protect<mpl_::arg<1>, 0> >'
> /usr/local/boost_1_32_alpha/boost/mpl/reverse_iter_fold.hpp:43: instantiated from `boost::mpl::reverse_iter_fold<f3, int, f2, boost::arg<1> >'
> foo.cpp:23: instantiated from here
> foo.cpp:11: no type named `type' in `struct mpl_::_2'
> /usr/local/boost_1_32_alpha/boost/mpl/aux_/preprocessed/gcc/bind.hpp: In instantiation of `boost::mpl::bind2<f1, mpl_::_2, mpl_::_1>::apply<int, boost::mpl::v_iter<f3, 3>, mpl_::na, mpl_::na, mpl_::na>':
> /usr/local/boost_1_32_alpha/boost/mpl/aux_/preprocessed/gcc/reverse_iter_fold_impl.hpp:140: instantiated from `boost::mpl::apply_wrap2<boost::mpl::bind2<f1, mpl_::_2, mpl_::_1>, int, boost::mpl::v_iter<f3, 3> >'
> /usr/local/boost_1_32_alpha/boost/mpl/aux_/preprocessed/gcc/reverse_iter_fold_impl.hpp:140: instantiated from `boost::mpl::apply2<boost::mpl::bind2<f1, mpl_::_2, mpl_::_1>, int, boost::mpl::v_iter<f3, 3> >'
> /usr/local/boost_1_32_alpha/boost/mpl/aux_/preprocessed/gcc/reverse_iter_fold_impl.hpp:140: instantiated from `boost::mpl::aux::reverse_iter_fold_impl<4, boost::mpl::v_iter<f3, 0>, boost::mpl::v_iter<f3, 4>, int, boost::mpl::bind2<f1, mpl_::_2, mpl_::_1>, boost::mpl::protect<mpl_::arg<1>, 0> >'
> /usr/local/boost_1_32_alpha/boost/mpl/reverse_iter_fold.hpp:43: instantiated from `boost::mpl::reverse_iter_fold<f3, int, f2, boost::arg<1> >'
> foo.cpp:23: instantiated from here
> /usr/local/boost_1_32_alpha/boost/mpl/aux_/preprocessed/gcc/bind.hpp:205: no
> type named `type' in `struct boost::mpl::apply_wrap2<f1, mpl_::_2, mpl_::_1>
> '
> /usr/local/boost_1_32_alpha/boost/mpl/aux_/preprocessed/gcc/reverse_iter_fold_impl.hpp: In instantiation of `boost::mpl::aux::reverse_iter_fold_impl<4, boost::mpl::v_iter<f3, 0>, boost::mpl::v_iter<f3, 4>, int, boost::mpl::bind2<f1, mpl_::_2, mpl_::_1>, boost::mpl::protect<mpl_::arg<1>, 0> >':
> /usr/local/boost_1_32_alpha/boost/mpl/reverse_iter_fold.hpp:43: instantiated from `boost::mpl::reverse_iter_fold<f3, int, f2, boost::arg<1> >'
> foo.cpp:23: instantiated from here
> /usr/local/boost_1_32_alpha/boost/mpl/aux_/preprocessed/gcc/reverse_iter_fold_impl.hpp:140: no
> type named `type' in `struct boost::mpl::apply2<boost::mpl::bind2<f1,
> mpl_::_2, mpl_::_1>, int, boost::mpl::v_iter<f3, 3> >'
> /usr/local/boost_1_32_alpha/boost/mpl/aux_/preprocessed/gcc/reverse_iter_fold_impl.hpp:141: no
> type named `type' in `struct boost::mpl::apply2<boost::mpl::bind2<f1,
> mpl_::_2, mpl_::_1>, int, boost::mpl::v_iter<f3, 3> >'
> /usr/local/boost_1_32_alpha/boost/mpl/aux_/preprocessed/gcc/reverse_iter_fold_impl.hpp:142: no
> type named `type' in `struct boost::mpl::apply2<boost::mpl::bind2<f1,
> mpl_::_2, mpl_::_1>, int, boost::mpl::v_iter<f3, 3> >'
> /usr/local/boost_1_32_alpha/boost/mpl/aux_/preprocessed/gcc/reverse_iter_fold_impl.hpp:143: no
> type named `type' in `struct boost::mpl::apply2<boost::mpl::bind2<f1,
> mpl_::_2, mpl_::_1>, int, boost::mpl::v_iter<f3, 3> >'
> /usr/local/boost_1_32_alpha/boost/mpl/aux_/preprocessed/gcc/reverse_iter_fold_impl.hpp:146: no
> type named `type' in `struct boost::mpl::apply2<boost::mpl::bind2<f1,
> mpl_::_2, mpl_::_1>, int, boost::mpl::v_iter<f3, 3> >'
> /usr/local/boost_1_32_alpha/boost/mpl/reverse_iter_fold.hpp: In instantiation of `boost::mpl::reverse_iter_fold<f3, int, f2, boost::arg<1> >':
> foo.cpp:23: instantiated from here
> /usr/local/boost_1_32_alpha/boost/mpl/reverse_iter_fold.hpp:43: no type named `
> state' in `struct boost::mpl::aux::reverse_iter_fold_impl<4,
> boost::mpl::v_iter<f3, 0>, boost::mpl::v_iter<f3, 4>, int,
> boost::mpl::bind2<f1, mpl_::_2, mpl_::_1>, boost::mpl::protect<mpl_::arg<1>,
> 0> >'
> foo.cpp:23: syntax error before `;' token
> foo.cpp: In function `int main()':
> foo.cpp:27: `f4' undeclared (first use this function)
> foo.cpp:27: (Each undeclared identifier is reported only once for each function
> it appears in.)
> foo.cpp:27: parse error before `;' token
>
> ------------------------------------------------------------------------
> _______________________________________________
> Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

39c39
< struct replace_unnamed_arg< arg< -1 >, Arg >

---
> struct replace_unnamed_arg< mpl::arg< -1 >, Arg >
48c48
< struct resolve_bind_arg< arg<N>, U1, U2, U3, U4, U5 >
---
> struct resolve_bind_arg< mpl::arg<N>, U1, U2, U3, U4, U5 >

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