|
Boost Users : |
From: David Abrahams (dave_at_[hidden])
Date: 2003-05-20 18:49:37
Tarjei Knapstad <tarjeik_at_[hidden]> writes:
> Ahh, it was the ::type requests which I didn't have a sufficient
> understanding for. I've solved it for now by specializing my class
> template for an empty sequence (I had a look at the Lambda stuff, but it
> involved quite a bit more than the specialization so I've postponed it)
If that's the only change you made, I guess I'd say... ick. Why not
use the nice fold invocation I gave you instead? But, to each his
own.
>> Oh, and please, do yourself a favor and follow the MPL metafunction
>> protocol! That means your result is called "::type", not "::Type".
>>
> Yes, but this goes againts our own coding standards unfortunately (all
> types are captialized). I'm considering a modification to our standards
> though, in that stuff that models STL concepts (like iterators etc.)
> should be named like they are in the STL. I'm still undecided on what
> will end up being less confusing...
It's less about confusability than about interoperability. If your
template is an MPL metafunction you can use it in lambda expressions,
with apply_if, etc. Otherwise, you can't.
> On a sidenote, I seem to remember from the ACCU conf. in Oxford this
> year that you were preparing a book on the MPL? Is it in it's early
> stages, or do you have any rough date for it's completion? (It certainly
> looks like I could need a copy ;) )
It's in its early-middle stages.
-- Dave Abrahams Boost Consulting www.boost-consulting.com
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