Return-Path: Delivered-To: apmail-stdcxx-dev-archive@www.apache.org Received: (qmail 84622 invoked from network); 26 Jun 2008 16:27:43 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 26 Jun 2008 16:27:43 -0000 Received: (qmail 89284 invoked by uid 500); 26 Jun 2008 16:27:45 -0000 Delivered-To: apmail-stdcxx-dev-archive@stdcxx.apache.org Received: (qmail 89270 invoked by uid 500); 26 Jun 2008 16:27:45 -0000 Mailing-List: contact dev-help@stdcxx.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@stdcxx.apache.org Delivered-To: mailing list dev@stdcxx.apache.org Received: (qmail 89259 invoked by uid 99); 26 Jun 2008 16:27:45 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 26 Jun 2008 09:27:45 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [208.30.140.160] (HELO moroha.roguewave.com) (208.30.140.160) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 26 Jun 2008 16:26:55 +0000 Received: from exchmail01.Blue.Roguewave.Com (exchmail01.blue.roguewave.com [10.22.129.22]) by moroha.roguewave.com (8.13.6/8.13.6) with ESMTP id m5QGRDnK022822 for ; Thu, 26 Jun 2008 16:27:13 GMT X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: RE: __rw_and (Was RE: Some internal aliases for __rw_integral_constant?) Date: Thu, 26 Jun 2008 10:26:37 -0600 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: __rw_and (Was RE: Some internal aliases for __rw_integral_constant?) Thread-Index: AcjXo9O0Yzj1XKB1RlqzZtgqwGKndAAAdbCA References: <48617F0F.2020100@roguewave.com> <4863B97C.7050304@roguewave.com> From: "Eric Lemings" To: X-Virus-Checked: Checked by ClamAV on apache.org =20 > -----Original Message----- > From: Martin Sebor [mailto:msebor@gmail.com] On Behalf Of Martin Sebor > Sent: Thursday, June 26, 2008 9:45 AM > To: dev@stdcxx.apache.org > Subject: Re: __rw_and (Was RE: Some internal aliases for=20 > __rw_integral_constant?) >=20 > Eric Lemings wrote: > > =20 > [...] > > Okay, another proposal for inclusion though this particular utility > > may be a stretch unless you understand variadic templates very well. >=20 > 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. >=20 > 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.