Boost logo

Boost Users :

From: Zach Laine (whatwasthataddress_at_[hidden])
Date: 2005-10-13 07:36:34


>Hello Zach,
>
>Zach Laine ha escrito:
>
> > The following code does not compile using gcc 3.4.3. I tried it with
>the
> > same results using 1.32 and 1.33. Reversing the order of the #includes
> > fixes the problem.
> >
> > Is this a known order dependency? If so, I couldn't find it documented
> > anywhere.
> >
> > #include <boost/multi_index_container.hpp>
> > #include <boost/mpl/map.hpp>
> >
> > int main()
> > {
> > return 0;
> > }
> >
> > Compiler output:
> >
>
>[...]
>
>I've reproduced your problem with GCC 3.2, though the error messages are
>slightly different. Digging a little deeper, the issue can be reproduced
>with
>this
>MPL-only snippet:
>
>#include <boost/mpl/set/set0.hpp> /* include last to suppress compiler
>error
>*/
>#include <boost/mpl/map.hpp>
>
>int main()
>{
> return 0;
>}
>
>Is this also failing for your compiler version? I'm posting this in a
>separate thread
>as it seems to be a MPL-specific problem.
>
>Best,
>
>Joaquín M López Muñoz
>Telefónica, Investigación y Desarrollo
>
>_______________________________________________
>Boost-users mailing list
>Boost-users_at_[hidden]
>http://lists.boost.org/mailman/listinfo.cgi/boost-users

Yes, that also fails for me using gcc 3.4.3, with this error output:

In file included from
/usr/local/include/boost-1_32/boost/mpl/map/map0.hpp:18,
                 from
/usr/local/include/boost-1_32/boost/mpl/map/map10.hpp:19,
                 from
/usr/local/include/boost-1_32/boost/mpl/map/map20.hpp:19,
                 from /usr/local/include/boost-1_32/boost/mpl/map.hpp:36,
                 from temp.cpp:3:
/usr/local/include/boost-1_32/boost/mpl/map/aux_/contains_impl.hpp:31:
error: no type named `apply' in `struct
boost::mpl::at_impl<boost::mpl::aux::map_tag>'
/usr/local/include/boost-1_32/boost/mpl/map/aux_/contains_impl.hpp:31:
error: no type named `apply' in `struct
boost::mpl::at_impl<boost::mpl::aux::map_tag>'
/usr/local/include/boost-1_32/boost/mpl/map/aux_/contains_impl.hpp:34:
error: template argument 1 is invalid
/usr/local/include/boost-1_32/boost/mpl/map/aux_/contains_impl.hpp:34:
error: expected `{' before '::' token
/usr/local/include/boost-1_32/boost/mpl/map/aux_/contains_impl.hpp:35:
error: invalid type in declaration before ',' token
/usr/local/include/boost-1_32/boost/mpl/map/aux_/contains_impl.hpp:35:
error: invalid use of `::'
/usr/local/include/boost-1_32/boost/mpl/map/aux_/contains_impl.hpp:35:
error: expected `;' before ',' token
/usr/local/include/boost-1_32/boost/mpl/map/aux_/contains_impl.hpp:38:
error: data member `type' cannot be a member template
In file included from
/usr/local/include/boost-1_32/boost/mpl/map/aux_/erase_key_impl.hpp:19,
                 from
/usr/local/include/boost-1_32/boost/mpl/map/aux_/erase_impl.hpp:19,
                 from
/usr/local/include/boost-1_32/boost/mpl/map/map0.hpp:22,
                 from
/usr/local/include/boost-1_32/boost/mpl/map/map10.hpp:19,
                 from
/usr/local/include/boost-1_32/boost/mpl/map/map20.hpp:19,
                 from /usr/local/include/boost-1_32/boost/mpl/map.hpp:36,
                 from temp.cpp:3:
/usr/local/include/boost-1_32/boost/mpl/map/aux_/has_key_impl.hpp:33: error:
no type named `apply' in `struct
boost::mpl::at_impl<boost::mpl::aux::map_tag>'
/usr/local/include/boost-1_32/boost/mpl/map/aux_/has_key_impl.hpp:33: error:
no type named `apply' in `struct
boost::mpl::at_impl<boost::mpl::aux::map_tag>'
/usr/local/include/boost-1_32/boost/mpl/map/aux_/has_key_impl.hpp:33: error:
wrong number of template arguments (2, should be 1)
/usr/local/include/boost-1_32/boost/mpl/void.hpp:55: error: provided for
`template<class T> struct boost::mpl::is_not_void_'
/usr/local/include/boost-1_32/boost/mpl/map/aux_/has_key_impl.hpp:33: error:
expected `{' before '::' token
/usr/local/include/boost-1_32/boost/mpl/map/aux_/has_key_impl.hpp:34: error:
expected init-declarator before '>' token
/usr/local/include/boost-1_32/boost/mpl/map/aux_/has_key_impl.hpp:34: error:
expected `;' before '>' token
In file included from
/usr/local/include/boost-1_32/boost/mpl/map/aux_/begin_end_impl.hpp:20,
                 from
/usr/local/include/boost-1_32/boost/mpl/map/map0.hpp:30,
                 from
/usr/local/include/boost-1_32/boost/mpl/map/map10.hpp:19,
                 from
/usr/local/include/boost-1_32/boost/mpl/map/map20.hpp:19,
                 from /usr/local/include/boost-1_32/boost/mpl/map.hpp:36,
                 from temp.cpp:3:
/usr/local/include/boost-1_32/boost/mpl/map/aux_/iterator.hpp:39: error:
wrong number of template arguments (2, should be 1)
/usr/local/include/boost-1_32/boost/mpl/void.hpp:37: error: provided for
`template<class T> struct boost::mpl::is_void_'
/usr/local/include/boost-1_32/boost/mpl/map/aux_/iterator.hpp:39: error:
`type' is not a member of `<declaration error>'
/usr/local/include/boost-1_32/boost/mpl/map/aux_/iterator.hpp:39: error:
`type' is not a member of `<declaration error>'
/usr/local/include/boost-1_32/boost/mpl/map/aux_/iterator.hpp:40: error:
template argument 1 is invalid
/usr/local/include/boost-1_32/boost/mpl/map/aux_/iterator.hpp:42: error:
expected `{' before '>' token
/usr/local/include/boost-1_32/boost/mpl/map/aux_/iterator.hpp:42: error:
expected unqualified-id before '>' token
/usr/local/include/boost-1_32/boost/mpl/map/aux_/iterator.hpp:42: error:
expected `;' before '>' token
/usr/local/include/boost-1_32/boost/mpl/map/aux_/iterator.hpp:60: error:
expected nested-name-specifier before "item_by_order"
/usr/local/include/boost-1_32/boost/mpl/map/aux_/iterator.hpp:60: error: ISO
C++ forbids declaration of `item_by_order' with no type
/usr/local/include/boost-1_32/boost/mpl/map/aux_/iterator.hpp:60: error:
expected `;' before '<' token


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