Return-Path: Delivered-To: apmail-stdcxx-dev-archive@www.apache.org Received: (qmail 8190 invoked from network); 2 Jul 2008 05:08:29 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 2 Jul 2008 05:08:29 -0000 Received: (qmail 55033 invoked by uid 500); 2 Jul 2008 05:08:31 -0000 Delivered-To: apmail-stdcxx-dev-archive@stdcxx.apache.org Received: (qmail 55016 invoked by uid 500); 2 Jul 2008 05:08:31 -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 55005 invoked by uid 99); 2 Jul 2008 05:08:31 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Jul 2008 22:08:30 -0700 X-ASF-Spam-Status: No, hits=0.2 required=10.0 tests=SPF_PASS,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of msebor@gmail.com designates 209.85.198.234 as permitted sender) Received: from [209.85.198.234] (HELO rv-out-0506.google.com) (209.85.198.234) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Jul 2008 05:07:38 +0000 Received: by rv-out-0506.google.com with SMTP id g37so227018rvb.23 for ; Tue, 01 Jul 2008 22:07:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :organization:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding:sender; bh=Rjayd2Ea1b0HoIw1CvLPSXZ9W739Fg9pPkjLXD148qs=; b=oWN8nxWz7sYlW2URRIOekr6S4j6P6KeH0ki4Dh3UGU9Ogeaid5XU0SqVE5ubeUtiDI ox4uxR87cyeEMB5qcR/KBYWP/e7KyzDL/kD1kUtnR0x6AblR6xoKdg+yhl02Bel4my6X QG8v9Fakt4H6g2dcyziuYkq9SLeSBxgV0NOF0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:organization:user-agent:mime-version:to :subject:references:in-reply-to:content-type :content-transfer-encoding:sender; b=rvIE2DwMqVuA4a6Ybh8UpLY99rJusUeoipzWkmO+/GgkSWpD2FYb+3KHr8QO0G5Rt6 xpHKkgXQKW9/CjIvMM2+inMXPd9/aA6U1eq0ZokCa1h2YGNrZW/P1K/fvtRCGlATvWvi CTyFQP+iOWAJytYL3MrLKvCCL6aE3lepa9Uf4= Received: by 10.115.48.15 with SMTP id a15mr6573554wak.217.1214975278752; Tue, 01 Jul 2008 22:07:58 -0700 (PDT) Received: from localhost.localdomain ( [71.229.200.170]) by mx.google.com with ESMTPS id z20sm2599410pod.11.2008.07.01.22.07.58 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 01 Jul 2008 22:07:58 -0700 (PDT) Message-ID: <486B0D2D.4090500@roguewave.com> Date: Tue, 01 Jul 2008 23:07:57 -0600 From: Martin Sebor Organization: Rogue Wave Software, Inc. User-Agent: Thunderbird 2.0.0.14 (X11/20080501) MIME-Version: 1.0 To: dev@stdcxx.apache.org Subject: Re: Tuple status References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: Martin Sebor X-Virus-Checked: Checked by ClamAV on apache.org Eric Lemings wrote: > > I got this problem fixed with my latest change. > > The tuple test suite needs to be bolstered (suggestions for additional > test strategies greatly appreciated BTW) but the implementation as a > whole is stable enough for code review. Excellent! It looks very clean -- I like it. Just a few quick questions and comments on the implementation (I haven't looked at the tests yet): 1. should only #include the traits header(s) for the the traits it needs, not all of , and use only the __rw_xxx traits (not std::xxx) 2. would it be possible (and would it make sense) for to forward declare reference_wrapper instead of #including the whole definition of the class to reduce the size of translation units that don't use the class? 3. why is is the base class __rw_tuple rather than std::tuple? (seems there's a lot of duplicate code between the two) 4. assuming the answer to (3) is yes, are the casts in tuple copy ctor and copy assignment necessary or might there be a cleaner way to accomplish the same thing? if not, please consider adding a brief comment explaining why they are important 5. assuming the answer to (3) is yes, would it be better to define the [in]equality comparison for __rw_tuple as (possibly member) functions called _C_equal and _C_less to avoid the casts in the same operators in tuple and reduce the size of the overload set? 6. we can and should remove the _RWSTD_NO_EXT_CXX_0X guards from all implementation headers under include/rw/ 7. the right place to #define _RWSTD_XXX macros is 8. why is std::ignore typedef'd to __rw_ignore when the latter isn't used anywhere (AFAICS), and shouldn't it be defined in a .cpp file to avoid multiply defined symbols? 9. shouldn't tuple_element take size_t as template argument as per LWG issue 755 10. the non-trivial bits could use some comments :) In __rw_tuple, are the accessors necessary? Would it be possible (and cleaner) to declare the appropriate specialization(s) of __rw_tuple a friend instead and have it (them) access the data members directly? A few notes on style :) a) please re-read points (0), (1), and (5) here: http://www.nabble.com/forum/ViewPost.jtp?post=18174685 b) please use the name _TypeT (as opposed to _Type) for template parameters c) in ctor initializer lists spanning multiple lines, please avoid dropping the colon or the comma; i.e., struct A: Base { int _C_i; A (int i): Base (), _C_i (i) { /* empty */ } or (for long initializer lists): A (int i): Base (very_long_sequence_of_arguments), _C_i (i) { // empty } d) I realize we haven't formally closed the VOTE on the variadic template parameters but I think we're all in agreement so we might as well start using the right naming convention (_TypeT and _TypesT, etc.) Martin > > Brad. > >> -----Original Message----- >> From: Eric Lemings [mailto:Eric.Lemings@roguewave.com] >> Sent: Monday, June 30, 2008 4:42 PM >> To: dev@stdcxx.apache.org >> Subject: RE: Tuple status >> >> >> Committed. >> >> Note, there is still a problem with using reference wrappers with >> make_tuple() which I'm currently working on but I didn't want >> to hold up >> this rather large change any longer. >> >> Brad. >> >>> -----Original Message----- >>> From: Eric Lemings [mailto:Eric.Lemings@roguewave.com] >>> Sent: Monday, June 30, 2008 10:46 AM >>> To: dev@stdcxx.apache.org >>> Subject: Tuple status >>> >>> >>> Just a brief status on tuple progress. >>> >>> I got the remaining portions of tuple (except the tie() >> function) work >>> late Friday. I did a personal code review over the weekend and am >>> applying some cleanup and other finishing touches. Should >> be checking >>> in a lot of changes later today. So just a heads up. >>> >>> Brad. >>>