220 29239 <3a2b221b-0234-715c-b9d8-1504314c5b87@gmail.com> article
Path: news.gmane.org!.POSTED!not-for-mail
From: Andrey Semashev <andrey.semashev@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Re: pragma once
Date: Sat, 29 Oct 2016 21:50:33 +0300
Lines: 45
Approved: news@gmane.org
Message-ID: <3a2b221b-0234-715c-b9d8-1504314c5b87@gmail.com>
References: <CAGz9X0c=CNLVEGgJ7=GJ2W+7fsvN7h+tbiFyf5Cx3aab0Xb=rQ@mail.gmail.com>
 <ffa0cf8c-25a4-49fe-9e99-dcce452b8dd6@isocpp.org>
 <2c278558-0dbc-4568-9b6b-7f159c94707e@isocpp.org>
 <4610802.tOzma7na2T@tjmaciei-mobl1>
 <fefab967-9db3-7204-a2d0-b9984ca5e8b4@gmail.com>
 <CAGg_6+OFUqxzy-3YErVKS0-4dU2TxLrJjev9TGWKOA1v8Lnp3g@mail.gmail.com>
 <CAEhD+6BXvsZ+NJgnbX3yiGQWQRzWODYz-NfG8p3U++Au90cKjA@mail.gmail.com>
 <CAGg_6+PwM8JjutxadW=RyzJD=egmHi5g1jNo7oLu9U4dihg6Kg@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; format=flowed
X-Trace: blaine.gmane.org 1477767040 5322 195.159.176.226 (29 Oct 2016 18:50:40 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Sat, 29 Oct 2016 18:50:40 +0000 (UTC)
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101
 Thunderbird/45.4.0
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBCXY5TXHWYJRB7G62PAAKGQESULTOBQ@isocpp.org Sat Oct 29 20:50:35 2016
Return-path: <std-proposals+bncBCXY5TXHWYJRB7G62PAAKGQESULTOBQ@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-wm0-f70.google.com ([74.125.82.70])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBCXY5TXHWYJRB7G62PAAKGQESULTOBQ@isocpp.org>)
	id 1c0YiA-0000bE-Id
	for gclcip-std-proposals@m.gmane.org; Sat, 29 Oct 2016 20:50:34 +0200
Original-Received: by mail-wm0-f70.google.com with SMTP id 79sf47080051wmy.6
        for <gclcip-std-proposals@m.gmane.org>; Sat, 29 Oct 2016 11:50:37 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=subject:to:references:from:message-id:date:user-agent:mime-version
         :in-reply-to: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=zweZtmked9zXfOh5pQrIVWDn2rBX3/tAshBNGRFpTg0=;
        b=XHpRWXKWx+5rQG9mNsARmPob6/XdLkKn83p/Y/bRFbSrxebByaGh2Uz8haMo1SrQmm
         S+N1eTEAMfH7HIrqSA/SiMFj2pkSHRodxh6mJI/2+8SKbhIma8dXy55WraS8fjeHyQTA
         v3FKhjcpnxyTxyn/EAbiKG7dgbqXd4CcOpNfTWsc0GuXbzgzhYWxQh4Pd6a+SPaGBfim
         Fd42Yq9vTxxwWxEfi557QSNiEbXA2XZ/hOuwWBtTPcXxYwArbIpbf6Z/XFuA4bZodBVL
         4qfWtbizziHl/zqalMgMU72TURe7rACS3CVBzLJ7Bm40dMtuRrulDU6bHS09IvWI1ddu
         QGQg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:subject:to:references:from:message-id:date
         :user-agent:mime-version:in-reply-to: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=zweZtmked9zXfOh5pQrIVWDn2rBX3/tAshBNGRFpTg0=;
        b=emurJBZQmGnOqDOnrbbogHEVN+qYILYaNNqk+X79/qufKtHdYyOTHipmzAPOhTnFeE
         yEV2XmegYBTNs4xKTDqkpDRV+UbAYdgRGjRIjb/dtXfCUAyrtyIMWA1F/SxF93ZokNzM
         eb8G/mlqJA7A6i4C9wGG3BXzPPzgpYmNZPKpKTPpzGpklYbSckYa2IdoW5cPqr6wTpYG
         ucTqPdoE24ie/CWBeii60ka66KSd3ETszGcmWVZBxbHHTPiovSQ4C8Dm4zIT7AShPtlM
         QHyTxRwlV8CtP9t+PKEcKKRsJZyIYdikVCykbX1DjL95MFhJ8zXvFVu3wAcNGDljrhXo
         gxRg==
X-Gm-Message-State: ABUngvdQ22AGJVKch8sDslafOGMDMh9lW6BrRKZFHhBGg40A8GDq67edSO68kPt0oxArcQ==
X-Received: by 10.28.25.3 with SMTP id 3mr300786wmz.22.1477767037402;
        Sat, 29 Oct 2016 11:50:37 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.25.195.67 with SMTP id t64ls680992lff.17.gmail; Sat, 29 Oct
 2016 11:50:35 -0700 (PDT)
X-Received: by 10.25.19.220 with SMTP id 89mr9296552lft.179.1477767035751;
        Sat, 29 Oct 2016 11:50:35 -0700 (PDT)
Original-Received: from mail-lf0-x22f.google.com (mail-lf0-x22f.google.com. [2a00:1450:4010:c07::22f])
        by mx.google.com with ESMTPS id x205si11299880lfa.239.2016.10.29.11.50.35
        for <std-proposals@isocpp.org>
        (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Sat, 29 Oct 2016 11:50:35 -0700 (PDT)
Received-SPF: pass (google.com: domain of andrey.semashev@gmail.com designates 2a00:1450:4010:c07::22f as permitted sender) client-ip=2a00:1450:4010:c07::22f;
Original-Received: by mail-lf0-x22f.google.com with SMTP id b81so78060943lfe.1
        for <std-proposals@isocpp.org>; Sat, 29 Oct 2016 11:50:35 -0700 (PDT)
X-Received: by 10.25.27.69 with SMTP id b66mr13008192lfb.36.1477767035009;
        Sat, 29 Oct 2016 11:50:35 -0700 (PDT)
Original-Received: from [192.168.1.2] (broadband-90-154-68-136.nationalcablenetworks.ru. [90.154.68.136])
        by smtp.googlemail.com with ESMTPSA id v62sm3031478lfa.44.2016.10.29.11.50.33
        for <std-proposals@isocpp.org>
        (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Sat, 29 Oct 2016 11:50:34 -0700 (PDT)
In-Reply-To: <CAGg_6+PwM8JjutxadW=RyzJD=egmHi5g1jNo7oLu9U4dihg6Kg@mail.gmail.com>
X-Original-Sender: andrey.semashev@gmail.com
X-Original-Authentication-Results: mx.google.com;       dkim=pass
 header.i=@gmail.com;       spf=pass (google.com: domain of
 andrey.semashev@gmail.com designates 2a00:1450:4010:c07::22f as permitted
 sender) smtp.mailfrom=andrey.semashev@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: <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:29239
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/29239>

On 10/29/16 21:08, Nevin Liber wrote:
> On Thu, Oct 27, 2016 at 6:06 PM, Andrey Semashev
> <andrey.semashev@gmail.com <mailto:andrey.semashev@gmail.com>> wrote:
>
>     On Fri, Oct 28, 2016 at 1:17 AM, Nevin Liber <nevin@eviloverlord.com
>     <mailto:nevin@eviloverlord.com>> wrote:
>     >
>     > There are three possibilities:
>     >
>     > 1. It is the same file according to the OS (e.g.: inode and device
>     match).
>     > 2. It must have different contents according to the OS (e.g. the
>     size doesn't
>     > match).
>
>     I think, the above two bullets cannot be implemented reliably. Event
>     the size may not be available if the source is read from a pipe.
>
>
> Honestly, I don't particularly care about insane development
> environments.

You should, if you plan to make a proposal.

> I also don't know of any requirement that compilers must
> be single pass.  And even if so, caching should be able to address it.
> Do you have a real world situation involving #pragma once and pipes
> instead of regular files?

I don't. But compilers do support reading input from a pipe, and nothing 
prevents #once to appear in that input. Compiler vendors have to 
implement #once in those circumstances as well, with behavior equivalent 
to the proposal.

> And because of modules, I'm not even sure pursing a #once solution
> (without specifying an identifier) is worth it.

I won't argue with this.

-- 
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/3a2b221b-0234-715c-b9d8-1504314c5b87%40gmail.com.

.
