220 33738 <1894906.unAOSKiKQz@tjmaciei-mobl1> article
Path: news.gmane.org!.POSTED!not-for-mail
From: Thiago Macieira <thiago@macieira.org>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Re: string_view for fstream::open()
Date: Wed, 09 Aug 2017 12:49:32 -0700
Lines: 22
Approved: news@gmane.org
Message-ID: <1894906.unAOSKiKQz@tjmaciei-mobl1>
References: <cb7b55ab-7113-4d99-949b-8568627d0b7f@isocpp.org> <9fedbad3-c6f6-4dbe-a215-814666c52c6b@isocpp.org> <CANh-dXmwXG=ENS9UhjE25fGq6Kg1quaGNm2OW_Rh_oJLYKtw=g@mail.gmail.com>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
X-Trace: blaine.gmane.org 1502308183 3167 195.159.176.226 (9 Aug 2017 19:49:43 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Wed, 9 Aug 2017 19:49:43 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBCB4TK757YBRBVGOVXGAKGQEYO2INNA@isocpp.org Wed Aug 09 21:49:38 2017
Return-path: <std-proposals+bncBCB4TK757YBRBVGOVXGAKGQEYO2INNA@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-lf0-f71.google.com ([209.85.215.71])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBCB4TK757YBRBVGOVXGAKGQEYO2INNA@isocpp.org>)
	id 1dfWz0-0000Q0-V4
	for gclcip-std-proposals@m.gmane.org; Wed, 09 Aug 2017 21:49:35 +0200
Original-Received: by mail-lf0-f71.google.com with SMTP id t20sf13250581lfe.5
        for <gclcip-std-proposals@m.gmane.org>; Wed, 09 Aug 2017 12:49:41 -0700 (PDT)
ARC-Seal: i=2; a=rsa-sha256; t=1502308181; cv=pass;
        d=google.com; s=arc-20160816;
        b=CB3MCvCwV1BWr/OgPZKXvr3+WHXzt4VmOSzlPvcjhROqjYFalaZb/DBGobArTOzE/C
         Qy+9TMwqCTzW7mnBqxXSfIlKeAK7lL+4/fc1I8bNp6foK6wRsRhMbHbq2RmkM2zBtdNB
         bc5nRDiPaYAg21HPJCl3zM1x/NDodzxvlDL35nGlRLH3pDoJaI56fAYeVkTCRY1ES6k6
         9owQ2BFYrMF2bUl/G7iDzuAkORmXmWtz15PGydyw/VWLgnJEOVSTsHVrJQ7bNkWWLtsU
         JzSp9hddKM8kQ8IQ2hmppcFuWA5QG0FcQ4kzPY9shDQzNgkchruyIZUxm7yYpNwhJTR3
         xqfw==
ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post
         :list-id:mailing-list:precedence:reply-to:mime-version:references
         :in-reply-to:message-id:date:subject:to:from
         :arc-authentication-results:arc-message-signature:dkim-signature
         :arc-authentication-results;
        bh=zRJWULOZwxcWWtX/zn76hXEKRYPfd3uklATwB+ViDBY=;
        b=mM99lqxRDhFIg9LfOzXftCUjQwuWbibW5w/h2WFqTMd22Jwi2Ash6KTUJN7E35TrLd
         w6YZevM2LTUuDgk8VfaIk/QFKGn/Of7wWG4FcnIGFJq5BFueHZm+t92OU7GwfpPb6zGq
         uMX6+tV8kuHm31WqH6UfYzAGX73JnKJQBpEH4igDuU7rybfzmetAxs8snIsdTyADwqlS
         MkP+oXNv5LEq4E8H98wHNqYfQ5liaOro25poTS6tF6VYSz1fvuEjdDqOHnqsrgaOJ/Zp
         xqWLNdMN0FTz5vrXP3r1jTPgqLsZ5MMkSpZNRt5v4e+nx37oZ7LpcSk6PBDKOSLxhaMb
         ft/A==
ARC-Authentication-Results: i=2; mx.google.com;
       spf=pass (google.com: domain of thiago@macieira.org designates 2a01:4f8:d13:f81:21c:14ff:fe01:12a3 as permitted sender) smtp.mailfrom=thiago@macieira.org
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=from:to:subject:date:message-id:in-reply-to:references:mime-version
         :x-original-sender:x-original-authentication-results:reply-to
         :precedence:mailing-list:list-id:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=zRJWULOZwxcWWtX/zn76hXEKRYPfd3uklATwB+ViDBY=;
        b=HpDFjWGwzTrTKFeb+pTiiJNIfIa/XOHq8d6mxYFkb8XvCsihKS9I3QAiEP31B1M8j5
         T6xbNc6ybip5HFGPoR94C2AlPkycW/0ami8uldLFfVuAWkyWfs1b80PSwVFNstasSVJB
         WnrmK+pT1MLXImFTzzulSeWYiQBxmWBE9gwRYu8tKBXKcgl/cLIJ93oXT+MXGYDcVG4b
         wC1pqgRfFubjn4bI6NeUCvu7O9hgqzd6sSTAlqMAt2aawBL4gBC00fHSv78kdrvIdFXy
         T8MPfvuI69/pbO5m97qNZYvT5YlGLtHLWSxIAw+00x2jjjfhlfzc9j3b8nVqdKM26E4g
         4ycQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to
         :references:mime-version:x-original-sender
         :x-original-authentication-results:reply-to:precedence:mailing-list
         :list-id:x-spam-checked-in-group:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=zRJWULOZwxcWWtX/zn76hXEKRYPfd3uklATwB+ViDBY=;
        b=n9KWD82DUzKUW9hm9UOiUugJUMeOZ8WDCtx81Iy8tVToBJgZsy7b56pPdulpaUnIGn
         +1wfXyq162QjIGLeFusptT0NGp2REhuAXvRGj9GiKXkSyw5p/Rd0nF3H/nsjRsLoD9WG
         pCxzuGwlCk4UDkeZwW3D/4Cw/sDAK4QsIru12+fPsM1Z7//TtERETqMQGMzafXsDxL7r
         hvpld+KBOTAI2F/FbfaUWDqvVzcG7MS4X6eQSbWqazpIrZLeoEgH/A3b8kVybkSe1XZo
         rTCr6ZXkhamgvdZhL9Huma1hsCq+gsSTw1A3oY4hTU/J+8RNLOVTulyCOU9gdMmkQ1hu
         /Ftg==
X-Gm-Message-State: AHYfb5h9OHrYe0c7H3zjiaKht3QqlX5N7iKY5UTU/eC5ZM321AOipY7K
	K+l5Yw1neGLcwMP5
X-Received: by 10.25.81.199 with SMTP id g68mr1084815lfl.21.1502308181592;
        Wed, 09 Aug 2017 12:49:41 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.28.238.21 with SMTP id m21ls2453928wmh.23.canary-gmail; Wed,
 09 Aug 2017 12:49:40 -0700 (PDT)
X-Received: by 10.223.151.133 with SMTP id s5mr6508145wrb.159.1502308180138;
        Wed, 09 Aug 2017 12:49:40 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; t=1502308180; cv=none;
        d=google.com; s=arc-20160816;
        b=gootY5RmxibCak0I57JspumTKENY83jD3ppL3SEjRQDKHpLdKAPQNbUtdL0WfE06JW
         AN/yKlO+hWka/w1OQJYEj4v9n1NUnmkhZhWwM/mh+P5Dk/BnegoRqm5EJq7tt1rfmzUb
         2CGj1eYXDV6g0pRzv8Y5l1awA9XAEHxO9x5b0m/GAjfkaARzW/DgNLEqBDvk8M/bARKl
         KlyVwyeA1adF6ZZGC3lxIaXkTWppyGayLXq8JMhyqfs8AxyU1RHEBKfcjf/CUtSDwCs0
         RLlGpWSZiDQ5oH3yHL6tvySqX0C8ei/8QSR0AdD1NpEjcwB3Upi0/l4huRwdy8eMmE/k
         5fdQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=content-transfer-encoding:mime-version:references:in-reply-to
         :message-id:date:subject:to:from:arc-authentication-results;
        bh=sQi2IOu6CR5bSgZjOEf0pkUmGsUdScJQlSfa0JzUggw=;
        b=iR1uaOl8KY5ySZ+03D1ixlE7DP5d2BZhoPKmpUWZMQ/1hHdKQjE5IuCowVstJDuPVt
         vWMcLNKYozxS8WIHQyd0vKbzxbuD+PvjgXJrB4yLVBvHMZZbeeW4mf67H535qCuqYTMJ
         LuBAGFP07Om8aXhcweTqT1Ej8rxvsK35mRtCZfClFAE2RcMGZwNgg3tF5DK+UHLES2lB
         Vv3hSMNi1axCrq7vNYDQwf2F0V5e5eHPeTLjBfy2zRaHWaAc2VQd4Re/MuwWqdlHdqOs
         fewW3yaJiiUbJg6bzdM2+R5atkCHS4Gpq2b6l+/vBVFJg0QXDkf+fgC28IrFBaSjNGq9
         xImg==
ARC-Authentication-Results: i=1; mx.google.com;
       spf=pass (google.com: domain of thiago@macieira.org designates 2a01:4f8:d13:f81:21c:14ff:fe01:12a3 as permitted sender) smtp.mailfrom=thiago@macieira.org
Original-Received: from gondolin.macieira.info (gondolin.macieira.info. [2a01:4f8:d13:f81:21c:14ff:fe01:12a3])
        by mx.google.com with ESMTP id u68si3692608wmd.21.2017.08.09.12.49.40
        for <std-proposals@isocpp.org>;
        Wed, 09 Aug 2017 12:49:40 -0700 (PDT)
Received-SPF: pass (google.com: domain of thiago@macieira.org designates 2a01:4f8:d13:f81:21c:14ff:fe01:12a3 as permitted sender) client-ip=2a01:4f8:d13:f81:21c:14ff:fe01:12a3;
Original-Received: from tjmaciei-mobl1.localnet (unknown [134.134.139.76])
	by gondolin.macieira.info (Postfix) with ESMTPSA id B46D411B6BC
	for <std-proposals@isocpp.org>; Wed,  9 Aug 2017 12:49:39 -0700 (PDT)
In-Reply-To: <CANh-dXmwXG=ENS9UhjE25fGq6Kg1quaGNm2OW_Rh_oJLYKtw=g@mail.gmail.com>
X-Original-Sender: thiago@macieira.org
X-Original-Authentication-Results: mx.google.com;       spf=pass (google.com:
 domain of thiago@macieira.org designates 2a01:4f8:d13:f81:21c:14ff:fe01:12a3
 as permitted sender) smtp.mailfrom=thiago@macieira.org
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: <https://groups.google.com/a/isocpp.org/group/std-proposals/post>, <mailto:std-proposals@isocpp.org>
List-Help: <https://support.google.com/a/isocpp.org/bin/topic.py?topic=25838>, <mailto:std-proposals+help@isocpp.org>
List-Archive: <https://groups.google.com/a/isocpp.org/group/std-proposals/>
List-Subscribe: <https://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>,
 <mailto:std-proposals+subscribe@isocpp.org>
List-Unsubscribe: <mailto:googlegroups-manage+399137483710+unsubscribe@googlegroups.com>,
 <https://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:33738
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/33738>

On quarta-feira, 9 de agosto de 2017 09:15:59 PDT 'Jeffrey Yasskin' via ISO C+
+ Standard - Future Proposals wrote:
> However, being system calls, they also cost significantly more than
> the cost of copying a path-length string, so don't be too afraid of
> just doing that.

The problem is the copying an input of arbitrary length in an exception-free 
and thread-safe manner.

You can't do malloc(), since that might fail. You can't use new[] because it 
might throw. You can't lock a mutex because that is not async signal safe.

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel Open Source Technology Center

-- 
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.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/1894906.unAOSKiKQz%40tjmaciei-mobl1.

.
