
I asked this on boost-users with no luck, so I figured I'd kick it up to the experts: I'm trying to use the 3-argument version of the mpl::at metafunction, as described in the on-line manual, but I'm getting a compile error (using gcc 4.0.2): --- error: wrong number of template arguments (3, should be 2) /usr/include/boost/mpl/at_fwd.hpp:20: error: provided for 'template<class Sequence, class N> struct boost::mpl::at' --- Looking at at.hpp, at_fwd.hpp, and aux_/at_fwd.hpp, I don't see any sign of a 3-argument version of at; everything seems to be defined in terms of a 2-argument template. Am I doing something wrong, or is this a bug?

Geoffrey Romer <geoff.romer@gmail.com> writes:
I asked this on boost-users with no luck, so I figured I'd kick it up to the experts:
I'm trying to use the 3-argument version of the mpl::at metafunction, as described in the on-line manual, but I'm getting a compile error (using gcc 4.0.2):
I saw your post but was waiting for Aleksey to answer. IIRC this is a known bug. -- Dave Abrahams Boost Consulting www.boost-consulting.com

On 9/26/05, David Abrahams <dave@boost-consulting.com> wrote:
Geoffrey Romer <geoff.romer@gmail.com> writes:
I asked this on boost-users with no luck, so I figured I'd kick it up to the experts:
I'm trying to use the 3-argument version of the mpl::at metafunction, as described in the on-line manual, but I'm getting a compile error (using gcc 4.0.2):
I saw your post but was waiting for Aleksey to answer. IIRC this is a known bug.
A bug in the code or the documentation? I.e. should I be waiting for a new version of MPL or reworking my code to use another approach?

--- Geoffrey Romer wrote:
A bug in the code or the documentation?
IIRC the documentation is correct, the 3-argument code was left unimplemented as an oversight. Cromwell D. Enage __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com

Geoffrey Romer writes:
On 9/26/05, David Abrahams <dave@boost-consulting.com> wrote:
Geoffrey Romer <geoff.romer@gmail.com> writes:
I asked this on boost-users with no luck, so I figured I'd kick it up to the experts:
I'm trying to use the 3-argument version of the mpl::at metafunction, as described in the on-line manual, but I'm getting a compile error (using gcc 4.0.2):
I saw your post but was waiting for Aleksey to answer. IIRC this is a known bug.
Yes, it is (http://www.crystalclearsoftware.com/cgi-bin/boost_wiki/wiki.pl?MPL_TODO_List).
A bug in the code or the documentation?
The former.
I.e. should I be waiting for a new version of MPL or reworking my code to use another approach?
Or you could submit a patch ;). But either way, the documentation reflects the actual intent and the plan is to fix the code. -- Aleksey Gurtovoy MetaCommunications Engineering

I.e. should I be waiting for a new version of MPL or reworking my code to use another approach?
Or you could submit a patch ;)
I'd love to, but don't feel qualified; the library code looks intimidating and I'm a newbie at template metaprogramming. Is there any documentation of the MPL internals (e.g. underlying structure of set and map) that I could use for guidance if I wanted to make an attempt?

Geoffrey Romer writes:
I.e. should I be waiting for a new version of MPL or reworking my code to use another approach?
Or you could submit a patch ;)
I'd love to, but don't feel qualified; the library code looks intimidating and I'm a newbie at template metaprogramming.
Understood.
Is there any documentation of the MPL internals (e.g. underlying structure of set and map) that I could use for guidance if I wanted to make an attempt?
Not at the moment. I was actually thinking that this particular change wouldn't require this kind of detailed knoweledge, but looking more into it, chances are that it will. Hmm, I will take care of it. -- Aleksey Gurtovoy MetaCommunications Engineering
participants (4)
-
Aleksey Gurtovoy
-
Cromwell Enage
-
David Abrahams
-
Geoffrey Romer