Return-Path: Delivered-To: apmail-incubator-stdcxx-dev-archive@www.apache.org Received: (qmail 85964 invoked from network); 13 Mar 2007 16:27:46 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 13 Mar 2007 16:27:46 -0000 Received: (qmail 28706 invoked by uid 500); 13 Mar 2007 16:27:54 -0000 Delivered-To: apmail-incubator-stdcxx-dev-archive@incubator.apache.org Received: (qmail 28691 invoked by uid 500); 13 Mar 2007 16:27:54 -0000 Mailing-List: contact stdcxx-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: stdcxx-dev@incubator.apache.org Delivered-To: mailing list stdcxx-dev@incubator.apache.org Received: (qmail 28680 invoked by uid 99); 13 Mar 2007 16:27:54 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 13 Mar 2007 09:27:54 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=UNPARSEABLE_RELAY X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: local policy) Received: from [208.50.6.28] (HELO WM28.inbox.com) (208.50.6.28) by apache.org (qpsmtpd/0.29) with SMTP; Tue, 13 Mar 2007 09:27:43 -0700 Received: from inbox.com (127.0.0.1:25) by inbox.com with [InBox.Com SMTP Server] id <703130093852.WM28> for from ; Tue, 13 Mar 2007 8:27:29 AM -0800 Mime-Version: 1.0 Date: Tue, 13 Mar 2007 08:27:26 -0800 Message-ID: <36090BD520E.00000329mbrown@inbox.com> From: Mark Brown Subject: [PATCH] Re: new container member functions cbegin() and cend() To: stdcxx-dev@incubator.apache.org, stdcxx-dev@incubator.apache.org, stdcxx-dev@incubator.apache.org In-Reply-To: <113B2B6290C.0000019Bmbrown@inbox.com> References: <45f1c741.6030803@roguewave.com> <053f9208b46.00000442mbrown@inbox.com> X-Mailer: INBOX.COM Content-Type: multipart/mixed; boundary="------------Boundary-00=_6PY8CRFBPRDUNRM4QV0K" X-IWM-ACU: 4lq2BhY7vhRKP8YuBcbp8lc4jG82MprNoDI-v9tc1rcMm57XiDfUqEpgpoHM ASPB6f6Jq8Up0pDHUC4A0TcUrwycL7WmA65JT6ULuWeBXAO-ISyHvwqN8pzq Rnuzx_csMyDJP_oo@ X-Virus-Checked: Checked by ClamAV on apache.org --------------Boundary-00=_6PY8CRFBPRDUNRM4QV0K Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Attached is my first attempt at a patch implementing these functions. = Please let me know if I've missed something. The ChangeLong entry is here: 2007-03-13 Mark Brown =09STDCXX-335 =09* map (cbegin, cend, crbegin, crend): Implemented new accessor functions. =09* set: Same. =09* string: Same. =09* vector: Same. =09* deque: Same. =09* list: Same. -- Mark > -----Original Message----- > From: mbrown=40inbox.com > Sent: Sat, 10 Mar 2007 10:12:09 -0800 > To: stdcxx-dev=40incubator.apache.org, stdcxx-dev=40incubator.apache.org > Subject: Re: new container member functions cbegin() and cend() >=20 >> -----Original Message----- >> From: sebor=40roguewave.com >> Sent: Fri, 09 Mar 2007 13:44:49 -0700 >> To: stdcxx-dev=40incubator.apache.org >> Subject: Re: new container member functions cbegin() and cend() >>=20 >> Mark Brown wrote: >>> The next C++ standard adds a couple of new container member functions, >>> cbegin() and cend(), that will make it easier to retrieve const >>> iterators from non-const container objects. Are there any plans to add >>> these functions to stdcxx? >>=20 >> I assume you're referring to the Working Draft of the Standard for >> Programming Language C++: >> http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2134.pdf >>=20 >> and the functions are those proposed in Walter Brown's Proposal >> to Improve const_iterator Use from C++0X: >> http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2004/n1674.pdf >=20 > Yes, the functions from Alternative 1 are the ones I was referring > to. They will become especially handy when the =22auto=22 feature is > available in compilers. Does anyone know of a compiler that > supports this use of auto? >=20 >>=20 >> I have no immediate plans to implement these functions but we >> certainly expect and plan to implement the new C++ standard by >> the time it comes out. >>=20 >> If you would like to submit a patch with these functions or any >> other feature that's expected to be in the next standard you >> are most welcome to do so. Small extensions like this one might >> be okay for trunk. Bigger features will probably be more >> appropriate for a yet-to-be created branch as suggested in >> STDCXX-299: https://issues.apache.org/jira/browse/STDCXX-299 >=20 > I will work on a patch. >=20 > -- Mark >=20 >>=20 >> Martin >>=20 >>>=20 >>> -- Mark --------------Boundary-00=_6PY8CRFBPRDUNRM4QV0K--