> -----Original Message----- > From: Martin Sebor [mailto:[EMAIL PROTECTED] On Behalf Of Martin Sebor > Sent: Thursday, June 26, 2008 9:45 AM > To: [email protected] > Subject: Re: __rw_and (Was RE: Some internal aliases for > __rw_integral_constant?) > > Eric Lemings wrote: > > > [...] > > Okay, another proposal for inclusion though this particular utility > > may be a stretch unless you understand variadic templates very well. > > Can you show what the code looks like w/o __rw_and for comparison?
I could try but you would want to read it about as much as I would want to write it. :) Basically, it would require all the hackery required for simulating variadic templates. Not pretty. > > In general, an important design principle behind stdcxx is efficiency, > both in time and in space. And in terms of time, both compilation as > well runtime efficiency is important. In contrast to the ordinary > kind, template metaprogramming tends to increase compilation times > much more noticeably. In C++ 0x a good amount metaprogramming code > is dictated by the standard already but as a rule we need exercise > restraint when introducing templatized helper code, especially > when template recursion is involved. Right. The way I see it, utilities like this are indended to simplify the required metaprogramming code. In order to do that though, other developers would have to reuse it. :) That's why I said at the bottom of the email that I'll probably hold off on moving it up the chain of includes to a more generic header where it would be more reusable until such a time when other developers find more need for it. (I doubt tuples will be the only place requiring compile-time logical operators.) But it's posted now so we're all aware of it at least. BTW, is template recursion really costly in terms of compile times? Brad.
