220 5857 <5EEBFD4F-87A9-4543-8449-B5CAAC2E29E6@gmail.com> article
Path: news.gmane.org!not-for-mail
From: Howard Hinnant <howard.hinnant@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Remove vector<bool>?
Date: Mon, 26 Aug 2013 20:36:11 -0400
Lines: 37
Approved: news@gmane.org
Message-ID: <5EEBFD4F-87A9-4543-8449-B5CAAC2E29E6@gmail.com>
References: <CAGsORuDQdeWAO5yjA6=h0hW9Y0Sj4F1gcHB61udw5JFmtx+g4Q@mail.gmail.com>	<b06daeb3-a585-4c55-aebf-cae643146838@isocpp.org>	<CAGg_6+O_d85CBjT+cTV6vQqepUTXVvUMV_QUioS6ELpQCav6GQ@mail.gmail.com>	<521B07D2.8070000@beamways.com>	<7d0bc129-f8aa-4803-bbd9-bd5ca504d728@isocpp.org>	<CAGsORuB8omCBfjco6i_zENDn23tx-5wg1jeHuhsGsiVMbGk+Ww@mail.gmail.com>	<77e0868c-6aed-4578-acc7-7cf1227465f6@isocpp.org>	<CAGsORuAAZChA8cyx4JTTqRmMNSGQXZyGdzrm9P0WVRMZSSg6Qw@mail.gmail.com>	<4E5B6BD9-363D-4B42-ACA3-029301F3F54E@gmail.com>	<CA+cyFgvGeOJQSfXAQg3z2TKXvFY-OYvhp6_EGMx_mxoskys7LQ@mail.gmail.com> <CAGsORuCKcuREjDJVyrfL+eHUF8diSENG2sVC2rjGnfOqcyOdBw@mail.gmail.com>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0 (Mac OS X Mail 6.5 \(1508\))
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Trace: ger.gmane.org 1377563773 2664 80.91.229.3 (27 Aug 2013 00:36:13 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Tue, 27 Aug 2013 00:36:13 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBCK2HM4L6YERB67I56IAKGQERHXQ7AI@isocpp.org Tue Aug 27 02:36:15 2013
Return-path: <std-proposals+bncBCK2HM4L6YERB67I56IAKGQERHXQ7AI@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-qe0-f69.google.com ([209.85.128.69])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBCK2HM4L6YERB67I56IAKGQERHXQ7AI@isocpp.org>)
	id 1VE7GX-00053z-2u
	for gclcip-std-proposals@m.gmane.org; Tue, 27 Aug 2013 02:36:13 +0200
Original-Received: by mail-qe0-f69.google.com with SMTP id 5sf4543106qeb.8
        for <gclcip-std-proposals@m.gmane.org>; Mon, 26 Aug 2013 17:36:12 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
        h=mime-version:subject:from:in-reply-to:date:message-id:references:to
         :x-original-sender:x-original-authentication-results:reply-to
         :precedence:mailing-list:list-id:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe:content-type
         :content-transfer-encoding;
        bh=6MmI049VzKygyJAkzprewPXSayljCtcnQC+ux4m5+lg=;
        b=iR1gtWP/nR7PxEON2bpj+K7NS6GY2VWlArl8zKPyc/IClYKiPCozIWtqEVpYznpe6D
         8VMiws+8fDmNmwo21N+lHZSzsprPj4EJGdhckR8+Pkzpv1acGTsGU9Lmt7GKwyXjf/2H
         r8XcTXRrC9pZ8h+Pj789/KLsQyZwV+3fN5gi9OM8acQlNHGYX5OPmPfOK6dgO4Kn9QuX
         K+LoklwnAGazI1OtJlGrA7nMEsdhjAmdJtVbRW9DI8HzG/HlTSU/vXKlCkqEMhzRJN2W
         U+gh+nOjoNzLRCNNDgodCgQKBFbvoubVgswjSmlM/wOyqW8qz7p7QFv4qDJtqqrtqUBp
         f9hg==
X-Received: by 10.236.147.70 with SMTP id s46mr6608742yhj.0.1377563772173;
        Mon, 26 Aug 2013 17:36:12 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.49.26.6 with SMTP id h6ls2561169qeg.99.gmail; Mon, 26 Aug 2013
 17:36:11 -0700 (PDT)
X-Received: by 10.224.114.132 with SMTP id e4mr19509116qaq.60.1377563771758;
        Mon, 26 Aug 2013 17:36:11 -0700 (PDT)
Original-Received: from mail-qa0-x232.google.com (mail-qa0-x232.google.com [2607:f8b0:400d:c00::232])
        by mx.google.com with ESMTPS id gb7si6588741qeb.129.1969.12.31.16.00.00
        (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
        Mon, 26 Aug 2013 17:36:11 -0700 (PDT)
Received-SPF: pass (google.com: domain of howard.hinnant@gmail.com designates 2607:f8b0:400d:c00::232 as permitted sender) client-ip=2607:f8b0:400d:c00::232;
Original-Received: by mail-qa0-f50.google.com with SMTP id o13so2052263qaj.9
        for <std-proposals@isocpp.org>; Mon, 26 Aug 2013 17:36:11 -0700 (PDT)
X-Received: by 10.224.66.201 with SMTP id o9mr19515809qai.36.1377563771667;
        Mon, 26 Aug 2013 17:36:11 -0700 (PDT)
Original-Received: from [10.0.1.4] (cpe-24-59-186-27.twcny.res.rr.com. [24.59.186.27])
        by mx.google.com with ESMTPSA id 2sm24306602qen.0.1969.12.31.16.00.00
        (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
        Mon, 26 Aug 2013 17:36:10 -0700 (PDT)
In-Reply-To: <CAGsORuCKcuREjDJVyrfL+eHUF8diSENG2sVC2rjGnfOqcyOdBw@mail.gmail.com>
X-Mailer: Apple Mail (2.1508)
X-Original-Sender: howard.hinnant@gmail.com
X-Original-Authentication-Results: mx.google.com;       spf=pass (google.com:
 domain of howard.hinnant@gmail.com designates 2607:f8b0:400d:c00::232 as
 permitted sender) smtp.mail=howard.hinnant@gmail.com;       dkim=pass
 header.i=@gmail.com;       dmarc=pass (p=NONE dis=NONE) d=gmail.com
Precedence: list
Mailing-list: list std-proposals@isocpp.org; contact std-proposals+owners@isocpp.org
List-ID: <std-proposals.isocpp.org>
X-Google-Group-Id: 399137483710
List-Post: <http://groups.google.com/a/isocpp.org/group/std-proposals/post>, <mailto:std-proposals@isocpp.org>
List-Help: <http://support.google.com/a/isocpp.org/bin/topic.py?topic=25838>, <mailto:std-proposals+help@isocpp.org>
List-Archive: <http://groups.google.com/a/isocpp.org/group/std-proposals/>
List-Subscribe: <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>,
 <mailto:std-proposals+subscribe@isocpp.org>
List-Unsubscribe: <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>,
 <mailto:googlegroups-manage+399137483710+unsubscribe@googlegroups.com>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:5857
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/5857>

On Aug 26, 2013, at 8:28 PM, Zhihao Yuan <zy@miator.net> wrote:

> On Mon, Aug 26, 2013 at 8:16 PM, Geoffrey Romer <gromer@google.com> wrote=
:
>> template <typename iter_t>
>> value_type& GetValue(iter_t iter) {
>>  return *iter;
>> }
>=20
> I think this can be "corrected" by just replacing the return type
> with `auto` :(

I was going to suggest:

typename std::iterator_traits<iter_t>::reference

but I like Zhihao's suggestion a lot better.  Unless you need the iterator_=
traits dance for SFINAE purposes.

Bottom line:  All we have to do is stop assuming that *iter returns a value=
_type&.  We already can not assume that for input iterators, do this does n=
ot seem like a big stretch.  And we already can not assume it for output it=
erators, even though we can use output iterators to modify values.

Howard

--=20

---=20
You received this message because you are subscribed to the Google Groups "=
ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposa=
ls/.

.
