[mpl][vacpp] recurrent problems with name confusions

Visual Age 6.0 for AIX complains about the way list iterator is defined "/home/tk/boost_regression/boost/boost/mpl/list/aux_/iterator.hpp", line 30.47: 1540-0416 (S) "next" cannot be declared because its name has already been used. The offending line is typedef l_iter<typename next<Node>::type> next; I guess it'd suffice with rewriting it as: typedef l_iter<typename boost::mpl::next<Node>::type> next; This error (and similar ones in range_c, transform_view, joint_view, pair_view,filter_view) seem to share the same pattern: the compiler complains whenever it finds a structure like this: struct foo { ... name ... typedef ... name; }; a possible workaround (though I cannot test it) is to rewrite this as: struct foo { ... boost::mpl::name ... typedef ... name; }; I don't know if vacpp is meant to be supported by MPL. In case it is, maybe this can be of some help. Best, Joaquín M López Muñoz Telefónica, Investigación y Desarrollo

Joaquín Mª López Muñoz wrote:
Visual Age 6.0 for AIX complains about the way list iterator is defined
"/home/tk/boost_regression/boost/boost/mpl/list/aux_/iterator.hpp", line 30.47: 1540-0416 (S) "next" cannot be declared because its name has already been used.
The offending line is
typedef l_iter<typename next<Node>::type> next;
I guess it'd suffice with rewriting it as:
typedef l_iter<typename boost::mpl::next<Node>::type> next;
I tested that and indeed this fixes the error. Can one of the MPL authors apply this fix, thanks ?

Toon Knapen writes:
Joaquín Mª López Muñoz wrote:
Visual Age 6.0 for AIX complains about the way list iterator is defined
"/home/tk/boost_regression/boost/boost/mpl/list/aux_/iterator.hpp", line 30.47: 1540-0416 (S) "next" cannot be declared because its name has already been used.
The offending line is
typedef l_iter<typename next<Node>::type> next;
I guess it'd suffice with rewriting it as:
typedef l_iter<typename boost::mpl::next<Node>::type> next;
I tested that and indeed this fixes the error. Can one of the MPL authors apply this fix, thanks ?
Done. -- Aleksey Gurtovoy MetaCommunications Engineering

Joaquín Mª López Muñoz writes:
Visual Age 6.0 for AIX complains about the way list iterator is defined
"/home/tk/boost_regression/boost/boost/mpl/list/aux_/iterator.hpp", line 30.47: 1540-0416 (S) "next" cannot be declared because its name has already been used.
The offending line is
typedef l_iter<typename next<Node>::type> next;
I guess it'd suffice with rewriting it as:
typedef l_iter<typename boost::mpl::next<Node>::type> next;
This error (and similar ones in range_c, transform_view, joint_view, pair_view,filter_view) seem to share the same pattern: the compiler complains whenever it finds a structure like this:
struct foo { ... name ... typedef ... name; };
a possible workaround (though I cannot test it) is to rewrite this as:
struct foo { ... boost::mpl::name ... typedef ... name; };
I don't know if vacpp is meant to be supported by MPL.
As much as it's possible within the current library infrastructure, yes.
In case it is, maybe this can be of some help.
It was, thank you! -- Aleksey Gurtovoy MetaCommunications Engineering
participants (3)
-
Aleksey Gurtovoy
-
Joaquín Mª López Muñoz
-
Toon Knapen