Opened 11 years ago

Last modified 11 years ago

#6281 new Feature Requests

Concepts for MPL

Reported by: Robert Ramey Owned by: Joel Falcou
Milestone: To Be Determined Component: mpl
Version: Boost 1.48.0 Severity: Not Applicable
Keywords: Cc:

Description

Attached please find implementation of concepts for MPL sequences and iterators. This includes some archtypes as well as some testing of the mpl implementations. This isn't quite complete, but it does do enough to help me find some errors in my mpl usage.

Attachments (1)

mpl concepts.zip (8.1 KB ) - added by Robert Ramey 11 years ago.
concept implementation and tests for mpl

Download all attachments as: .zip

Change History (3)

by Robert Ramey, 11 years ago

Attachment: mpl concepts.zip added

concept implementation and tests for mpl

comment:1 by Joel Falcou, 11 years ago

Thanks Robert, will add these to boost/mpl/concepts asap.

comment:2 by Robert Ramey, 11 years ago

You might want to be a little more conservative about this. I don't think it's really ready to be unleashed upon unsuspecting users. I'm working on something else which designed to be used my "end users". In order to keep some trivial error from unleashing a blizzard of immpenatrable error messages, I am implementing concepts into this "something else" from the very beginning. In doing this, I came to realize that I had to do this for some of MPL as well - hence this package. I've posted it here in the hope you or someone else might find it useful. It includes concepts for MPL iterators and for MPL forward and associative sequences. It's missing concepts for other types of sequences - extensible ... .

I've included archtypes as part of the test. I had a lot of difficulty with making archtypes for the test and I don't think this is really correct. So given this, I made test_concepts.cpp which tests some the sequences provide by mpl - list, set, etc. Of course it should be no surprise that this brought out problems in the concepts themselves which had to be addressed.

So the code might be useful - but not really ready for prime time. If this were deemed useful, it should be completed for the other sequences and include some documentation. Also the directory structure would have to be tweeked to be able to just drop into MPL. At this point, I'm happy to put it here and see if there is sufficient interest to justify this extra effort. Hmmmm - maybe this should be posted to the vault. Or maybe if you look at it you might find it useful and feel comfortable in incorporating right away. It's totally up to you as far as I'm concerned.

For me, just making the code has be instructive to me personally. But even more interesting, it has already found a few bugs in my "real" code that I'm not sure I would have found.

Anyway, I'll leave this to you. Thanks for an encouraging reception.

Robert Ramey

Note: See TracTickets for help on using tickets.