|
Boost : |
From: David Abrahams (dave_at_[hidden])
Date: 2008-08-21 23:45:33
on Wed Aug 20 2008, "Peter Dimov" <pdimov-AT-pdimov.com> wrote:
> Hi,
>
> Assume that I have a custom type sequence S that has two operations,
> size<S>::value and element<S,I>::type (with whatever spelling).
>
> What needs to be done to adapt S into a conforming MPL or Fusion sequence?
>
> In a perfect world, the answer would not require the inclusion any MPL
> or Fusion headers and would consist of three specializations. ;-)
Well, if it's an MPL sequence it's a fusion sequence, IIUC. So you need
to decide which sequence to model
http://www.boost.org/doc/libs/1_36_0/libs/mpl/doc/refmanual/concepts.html
According to
http://www.boost.org/doc/libs/1_36_0/libs/mpl/doc/refmanual/forward-sequence.html
you can make a forward sequence with 5 specializations.
Please let me know if that's not enough information.
-- Dave Abrahams BoostPro Computing http://www.boostpro.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk