Subject: Re: [boost] [TTI] Review
From: Dave Abrahams (dave_at_[hidden])
Date: 2011-07-18 21:28:02
on Sun Jul 17 2011, Edward Diener <eldiener-AT-tropicsoft.com> wrote:
> On 7/17/2011 5:53 PM, Dave Abrahams wrote:
>> One can build a completely lazy MPL if you say that everything has to be
>> a metafunction: all types are wrapped in nullary metafunctions before
>> they are used, so you don't reach in and grab the nested ::type until
>> you are ready to get the final result of your computation. Vesa
>> Karvonen was the first one to do this IIUC. Unfortunately my
>> experiments have revealed that if you rely on this idiom everywhere you
>> get horrible compile-time performance.
> What is IIUC ?
"if I understand correctly"
> I did not add the nullary type metafunctions for "laziness" but just
> as a syntactical convenience. I hope others realize that they can use
> them or ignore them as they see fit and if they do slow down compile
> times they should be ignored.
Again, I don't know what you're actually doing here or if it's the same
as what I described above. However, if you *are* doing things as I
described, whatever your purpose in doing so, my point is that if you do
it consistently, you /get/ laziness, /and/ you get its performance
-- 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