220 33821 <8213093.ESMYL9sCCc@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: Fri, 11 Aug 2017 09:34:23 -0700
Lines: 29
Approved: news@gmane.org
Message-ID: <8213093.ESMYL9sCCc@tjmaciei-mobl1>
References: <cb7b55ab-7113-4d99-949b-8568627d0b7f@isocpp.org> <ebf29cbb-b62d-40e2-9fc7-4527bd5db2df@isocpp.org> <CAA7U3HNUMs_QRbxqm8kS41UNkNN6D_2AJWVOk+PCwgfYM2mnjg@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 1502469280 25070 195.159.176.226 (11 Aug 2017 16:34:40 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Fri, 11 Aug 2017 16:34:40 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBCB4TK757YBRBGFZW7GAKGQELTTTJHI@isocpp.org Fri Aug 11 18:34:34 2017
Return-path: <std-proposals+bncBCB4TK757YBRBGFZW7GAKGQELTTTJHI@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-pf0-f200.google.com ([209.85.192.200])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBCB4TK757YBRBGFZW7GAKGQELTTTJHI@isocpp.org>)
	id 1dgCtI-0005qB-Ap
	for gclcip-std-proposals@m.gmane.org; Fri, 11 Aug 2017 18:34:28 +0200
Original-Received: by mail-pf0-f200.google.com with SMTP id r187sf41935739pfr.8
        for <gclcip-std-proposals@m.gmane.org>; Fri, 11 Aug 2017 09:34:34 -0700 (PDT)
ARC-Seal: i=2; a=rsa-sha256; t=1502469274; cv=pass;
        d=google.com; s=arc-20160816;
        b=u86xWDeryk1Ts8UZiInNpgTVvYN7AcIeYIK4s/pybhFeeKNKTlRNyMzSfvUKAuQHyH
         u38t/TvfJzBzPOOVOTgsD3jnwGSXmqFIN/1UHwpTlQxYx74/I2IOf+p8vE3hEIxiLW4i
         wy1E8+bHl4XArHPbXlTTdrOmS88E2k/H50lMn7PDs2wx/aH62+40xJLvXma7Xl0KjGTa
         BHXOgfxS/7o+KS6QJ5H5GUtu3++zUAUE29yq/D+9pFyY9FkfJaKhMmAY+wjLVlAvVma7
         MlprFcsLcoojycDfqO3KQDK8PvtPE9c4561Wf7O1yfZLI52gjwNBusL+Qs36OKcecEIU
         3atA==
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=K7A8pps66ppdx42nvzWAi4tam4DWXlZUyVf8dZNBths=;
        b=h4h02b+ACvfjBTWHoA2RMpZaBVZmPdOpKut8iG5FHsWJDT0bXQl9Vk9TZIDmNPeDeL
         /OHn3qAvpryiMRil5izj9hmfOZ/v+HW/0DaiNhKEbB47sASGKsWxdWIHcTDRW8e649vJ
         HyS72P4Li5lfvx6p/luARrdxGkjYcdOrqkGpbZxGccestNku2lmL+OIqaJ+DUbUrASK/
         PcY+QY6SwSRhYyP1rE2KhdgGqvNurvaj49CrUDtMGGxAH2mK5vEpRd9ZvVs9Bq7oz68d
         VDw957/cxfO/1NlYvXOdO45E+sZe4h/0GthKN8mvjNzpUk7tv4MDoPxly4sFt1FGqxtP
         G3ow==
ARC-Authentication-Results: i=2; mx.google.com;
       spf=pass (google.com: domain of thiago@macieira.org designates 78.47.120.188 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=K7A8pps66ppdx42nvzWAi4tam4DWXlZUyVf8dZNBths=;
        b=Pp0B/YueeQDyecHN889tLaQFIrajiqgEwM122/2pv1v7SZo/fw73WaZ9vRuuLIdIkJ
         W0EZ0vNwvVYCkYcgkH6j2t1sm3AsPS5WuS6g4ws7JXzBTR2ATYIn9PES4h1HqnpKWKNK
         o6KW9pqYE5ge0VBreJ2zLmRNPfQahDe+xMOvzEE6QnGw6A+RR45+3T8AIS30kejNP875
         FD+W6HhpIiqmtz75DjVz+Tb4f/avt6pg+IZQ4MhZMOG4j4Kmm18nF8mBQpMrh0G28Fbr
         AT6FhUXH83GOWjiwwaJYOImCraA8v8PeV2eBO7BlLRyI8MVjGL/UhNYYhZVZ9mOfkP89
         v4zw==
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=K7A8pps66ppdx42nvzWAi4tam4DWXlZUyVf8dZNBths=;
        b=GMFpD/cidq+nkfikAi6riMS9kWP17IVXlmKVcWDvmyG3up7W1TvkgFWTrA03eUtXJN
         UHNGyyIo/2IuCA/0ZBxqmMz7S/wG/ieVm1Yh/lIyOdMq5zUInagGnU7PSlt4bgwFKir8
         7qGwUHA1USYBjFDYpGgwGM5U/8cgW17ICoSSAIVtUBJpmnqG7peu+kiOO5kWO+T06UCd
         raxkBysSyuuJqgnWwKepIp3d5RHoaO4Hmq85xP9UJA069I8DA4ayHZiw6QIPGKuIfMuZ
         TqBFg+wDNKH+MGKU9oR7qB+AynYqZPXQP48JVOsfp+2qHcYXoYxzWGrQ1jZ9Oax585Na
         SpPw==
X-Gm-Message-State: AHYfb5heGssIti9VLXo8Abtx0cZg/3idI+j28cVl9HS8BDEhnnutsGMe
	l8+nb3ryUwoQb8LD
X-Received: by 10.101.75.201 with SMTP id p9mr10027491pgr.135.1502469274148;
        Fri, 11 Aug 2017 09:34:34 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.107.53.130 with SMTP id k2ls1576671ioo.42.gmail; Fri, 11 Aug
 2017 09:34:32 -0700 (PDT)
X-Received: by 10.107.8.217 with SMTP id h86mr13437071ioi.284.1502469272708;
        Fri, 11 Aug 2017 09:34:32 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; t=1502469272; cv=none;
        d=google.com; s=arc-20160816;
        b=Y3bMuEY7XRhWod4OfMowDDdd3D2MybfO4jj4gOsKML/nZZ0ZhgexZYVfIrcm7B0KnG
         /+49UJidCc8U4t1yHwnmGc09zuj88RZihPj+cFxj1smpit12zpa5I46mF8v60NY5tHR8
         kpyxN/AwE22r+bLsZO/zKZIh563m5XiF9TPqHFPe0cIOKMxISVq5ANox8POIYy0B16GJ
         5ye62RbtQNWNXMCZzfaTx5zVCAp0+WhZEL7aPjGaTn6QMwicCUKqv6pHesv7Ymr9Jl9b
         zUCIM/hFST+dKVFrJ47HpuK8cImJb/VIxKvlRl/tPjUeUlvBX0sSirLCCknXS67P+a8e
         oHZg==
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=S6yM2YLgQ4Zz3emXPCx1BewdY+8fYH/v3MIECUWWXmE=;
        b=TIAKUQcq+8Sq6thD1ev6vVUEYYCqDHL+T+08NbkwLyPscmnUErYpngfLyVSUvDYXUX
         GZFrOmDFaIHT1Ul23g2bYkevAkE5Uce0c/dA5CYUBBYNXWyBHvIahzE6TCLG04o0rCkb
         DmriAA5n84R19lucI/guvAKvN/6PwYDMwHDJmQHQinvTPfZiIDpSgUVmy96IR8rSTsKF
         tlAxGcRyfwjOvtD8Pm5Q71VEx3dAO8wk1w62zk8FPXL8W0/Vzv+1MrWh/eIXE3+e6tHD
         BuzcH/fDqK0vtPXcLYVSGXzpre2MnhCjUJ03HE5mp2g/RS/fdqRcOhFb4oIKUFbnnlQq
         l8qQ==
ARC-Authentication-Results: i=1; mx.google.com;
       spf=pass (google.com: domain of thiago@macieira.org designates 78.47.120.188 as permitted sender) smtp.mailfrom=thiago@macieira.org
Original-Received: from gondolin.macieira.info (gondolin.macieira.info. [78.47.120.188])
        by mx.google.com with ESMTP id i19si1253064iod.30.2017.08.11.09.34.32
        for <std-proposals@isocpp.org>;
        Fri, 11 Aug 2017 09:34:32 -0700 (PDT)
Received-SPF: pass (google.com: domain of thiago@macieira.org designates 78.47.120.188 as permitted sender) client-ip=78.47.120.188;
Original-Received: from tjmaciei-mobl1.localnet (jfdmzpr05-ext.jf.intel.com [134.134.139.74])
	by gondolin.macieira.info (Postfix) with ESMTPSA id 3CD4711B6FA
	for <std-proposals@isocpp.org>; Fri, 11 Aug 2017 09:34:31 -0700 (PDT)
In-Reply-To: <CAA7U3HNUMs_QRbxqm8kS41UNkNN6D_2AJWVOk+PCwgfYM2mnjg@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 78.47.120.188 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:33821
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/33821>

On sexta-feira, 11 de agosto de 2017 02:16:19 PDT Olaf van der Spek wrote:
> > The requirement in order to provide defined behaviour that the character
> > after the view must be readable is publicly documented.
> 
> Ouch. IMO that's not a reasonable requirement / interface.
> 
> > Failure by the end
> > user to ensure this leads to UB, specifically, a segfault.
> 
> What could the committee do about this?

Why should the committee do something about it?

	void *ptr = mmap(nullptr, 4096, PROT_READ, MAP_PRIVATE | MAP_ANON, -1, 0);
	std::string_view(static_cast<char *>(ptr), 4096);

The character after the end of the string is not readable. Why do you want me 
to have 100% overhead?

-- 
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/8213093.ESMYL9sCCc%40tjmaciei-mobl1.

.
