220 9505 <CAFk2RUYb37QCPZg7NFFp5PrAvSzz62V0qFWZ8GC+dO9OqpTXcA@mail.gmail.com> article
Path: news.gmane.org!not-for-mail
From: Ville Voutilainen <ville.voutilainen@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Feedback on N3949 - Scoped Resource - Generic
 RAII Wrapper for the Standard Library
Date: Mon, 3 Mar 2014 09:37:06 +0200
Lines: 47
Approved: news@gmane.org
Message-ID: <CAFk2RUYb37QCPZg7NFFp5PrAvSzz62V0qFWZ8GC+dO9OqpTXcA@mail.gmail.com>
References: <CAFk2RUbEtKVv59CzdT-qittbwk64Z=cKBFkP__Z8_kdoPSa5Vg@mail.gmail.com>
	<67F4693D-4473-4700-A60E-8C434D55E226@gmail.com>
	<CAFk2RUafGLPR+o1hFtBJjS7Ho0Ms1_q-Mtazsf5jp8CFF-5qqA@mail.gmail.com>
	<C06AD35E-4462-4868-834D-0F105538621D@gmail.com>
	<CAFk2RUZM=mtwYc6W5N27ZMVypW8dpBM542pTCNdRxhZLepDP0A@mail.gmail.com>
	<046BD86D-F427-492C-8F6A-14F448806E3D@gmail.com>
	<CAFk2RUZFydg9Nfa0oqbB8rfgKQ4jiWkV11Px57mw2JmxcBKqEg@mail.gmail.com>
	<904A2E2E-8F3B-4787-B368-8C5CC888F4B7@gmail.com>
	<CAFk2RUZfqf6vH1TohTLpsgwpBSE1Pz8RZ=Djprp4bCFZjrMfTg@mail.gmail.com>
	<7B6D9AC1-7C06-4300-9A27-9D465F1BDB24@gmail.com>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
X-Trace: ger.gmane.org 1393832220 18169 80.91.229.3 (3 Mar 2014 07:37:00 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Mon, 3 Mar 2014 07:37:00 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBC5JHI7A7ALRBIXC2CMAKGQE6IYOJII@isocpp.org Mon Mar 03 08:37:09 2014
Return-path: <std-proposals+bncBC5JHI7A7ALRBIXC2CMAKGQE6IYOJII@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-oa0-f72.google.com ([209.85.219.72])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBC5JHI7A7ALRBIXC2CMAKGQE6IYOJII@isocpp.org>)
	id 1WKNQy-0002T4-I9
	for gclcip-std-proposals@m.gmane.org; Mon, 03 Mar 2014 08:37:08 +0100
Original-Received: by mail-oa0-f72.google.com with SMTP id g12sf19561242oah.7
        for <gclcip-std-proposals@m.gmane.org>; Sun, 02 Mar 2014 23:37:07 -0800 (PST)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:mime-version:in-reply-to:references:date
         :message-id:subject:from: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;
        bh=E4NaZznf6JqR1dw9efHNQ/duPjY9/speItu7NMkUVxY=;
        b=iPrROzd69tAhrxA61cNbeJMBajdbLbSLOvotys31vzx6ADq8JHBMKyQvmw+jkHHRmq
         hPUdBscvvJJu/FG111G3IzBFLElNp4t0BG7nsogT/VMC0hybqrKmSljJvROKLbQ5H2H3
         GzrNLgk7IEpvHruUo+sVn7CIcucLJ1ZY+PCvMKk2+r/Ld2bBlANfMnuJI3H3i2iaSUi/
         Z85evmm5kv2OKBCrpRtyuRM8Gskn1RsGjU44Vyln9Dp1FzEXxtPyENtGlPqE9Je3kPFJ
         /ie5zngoiHbqMuzcw9bv1JA9cAXjcg1SmqtVcLRKPBRlq/TnNiVJkoffbSPJX1PVOcMq
         /NeA==
X-Gm-Message-State: ALoCoQlndyLFKzsOvhlwr2dZTi7+l1lbBQrjCtiK3ou7Yv4qF0GXPxZiB+nrCShNbl1Wjtr6iL0s
X-Received: by 10.43.125.196 with SMTP id gt4mr8416438icc.32.1393832227361;
        Sun, 02 Mar 2014 23:37:07 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.140.42.14 with SMTP id b14ls2081959qga.47.gmail; Sun, 02 Mar
 2014 23:37:06 -0800 (PST)
X-Received: by 10.224.44.8 with SMTP id y8mr21429911qae.44.1393832226479;
        Sun, 02 Mar 2014 23:37:06 -0800 (PST)
Original-Received: from mail-qg0-x232.google.com (mail-qg0-x232.google.com [2607:f8b0:400d:c04::232])
        by mx.google.com with ESMTPS id f6si5315563qap.152.2014.03.02.23.37.06
        for <std-proposals@isocpp.org>
        (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
        Sun, 02 Mar 2014 23:37:06 -0800 (PST)
Received-SPF: pass (google.com: domain of ville.voutilainen@gmail.com designates 2607:f8b0:400d:c04::232 as permitted sender) client-ip=2607:f8b0:400d:c04::232;
Original-Received: by mail-qg0-f50.google.com with SMTP id z60so10392341qgd.9
        for <std-proposals@isocpp.org>; Sun, 02 Mar 2014 23:37:06 -0800 (PST)
X-Received: by 10.224.22.65 with SMTP id m1mr29259qab.103.1393832226364; Sun,
 02 Mar 2014 23:37:06 -0800 (PST)
Original-Received: by 10.224.65.6 with HTTP; Sun, 2 Mar 2014 23:37:06 -0800 (PST)
In-Reply-To: <7B6D9AC1-7C06-4300-9A27-9D465F1BDB24@gmail.com>
X-Original-Sender: ville.voutilainen@gmail.com
X-Original-Authentication-Results: mx.google.com;       spf=pass (google.com:
 domain of ville.voutilainen@gmail.com designates 2607:f8b0:400d:c04::232 as
 permitted sender) smtp.mail=ville.voutilainen@gmail.com;       dkim=pass
 header.i=@gmail.com;       dmarc=pass (p=NONE dis=NONE) header.from=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:9505
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/9505>

On 3 March 2014 09:08, David Krauss <potswa@gmail.com> wrote:
>> I don't think such iterators should have such an operator->.
>> [iterator.requirements.general]/1 says
>> "All iterators i for which the expression (*i).m is well-defined, support
>> the
>> expression i->m with the same semantics as (*i).m. "
>> For the iterators in case here, (*i).m is not well-defined, so they
>> shouldn't
>> support operator->.
> The standard simply doesn't discuss the implementation of iterator
> operator->. It does not require the function to exist, but neither does it
> forbid it, and it's such a minor QOI issue that nobody cares. SFINAE is just

Yes, what the quoted passage say doesn't really define whether the operator
is or is not there, unfortunately.

> a hoop to jump through here, and it makes implementation bugs more likely.

Implementations have to perform such "does not participate in overload
resolution"
conditioning in so many places that this is a non-issue. Weighing the pointless
presence of a certainly-ill-formed operator versus the implementation
complexity,
I'd say the restrictions for operator-> and operator* are just fine,
and should be
specified correctly.

> You could say the same for operator*; it exists for an int resource but
> using it results in an ill-formed implicit specialization. This also has the

Except that it doesn't exist for an int resource according to the
current proposal.

> effect of making the class impossible to explicitly instantiate, which may
> be a real issue.

All the more reason to avoid always-ill-formed member functions.
Thus far I've heard zero good reasons to include them unconditionally.

-- 

--- 
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 email 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-proposals/.

.
