220 29225 <75abf111-7808-84df-be82-6fddcd5d1e8c@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: [RFC] #pragma once... yes, really...
 (concrete proposal)
Date: Sat, 29 Oct 2016 00:00:25 +0300
Lines: 55
Approved: news@gmane.org
Message-ID: <75abf111-7808-84df-be82-6fddcd5d1e8c@gmail.com>
References: <58122C8D.9060205@gmail.com>
 <65c2ed7c-e47e-46cb-af9d-d692f0fc2b47@isocpp.org>
 <5813ADD2.5070609@gmail.com>
 <46bd0615-dd74-464d-8885-34f52d839fa5@isocpp.org> <5813B610.10106@gmail.com>
 <28223b1b-dd80-4055-acb0-aef52b6a228d@isocpp.org>
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 1477689392 842 195.159.176.226 (28 Oct 2016 21:16:32 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Fri, 28 Oct 2016 21:16:32 +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+bncBCXY5TXHWYJRBDMAZ7AAKGQE5NT7W7A@isocpp.org Fri Oct 28 23:16:26 2016
Return-path: <std-proposals+bncBCXY5TXHWYJRBDMAZ7AAKGQE5NT7W7A@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-wm0-f69.google.com ([74.125.82.69])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBCXY5TXHWYJRBDMAZ7AAKGQE5NT7W7A@isocpp.org>)
	id 1c0EVH-0004Mp-JI
	for gclcip-std-proposals@m.gmane.org; Fri, 28 Oct 2016 23:15:55 +0200
Original-Received: by mail-wm0-f69.google.com with SMTP id 2sf37081246wmj.0
        for <gclcip-std-proposals@m.gmane.org>; Fri, 28 Oct 2016 14:15:58 -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=89fh+wLRXKFVjJIUjrcdKKSrKUkGbOeWAntspfrjE3Q=;
        b=bucJ2mGvdkNqXpjPX7ZjWNu9/5jugJK5ZWitud9ijuLnN3HAjEdHITcQ+7cmCM7oPy
         sq/st1r8skv6a4h0Uf60kJxeIciM9dvje7NjJM8rtxUa/VVyC2vs1i9z32cMbhOFxvZc
         /GUKWNJ88YP8UTL1G/BeiXDeIkYZmcb6I0RfdSh9pZk8+UMfV3xytOXDjy5wctP8v/Z0
         0j7tIXR+8mgMiVw2dgAs8azCkzNWDRg/QLLoXqHjLX9v5dTTFPlX8TFlZchXBCLPTpNT
         5bL2uXh5DtJSkm9RAAGMKus9+VxW3ydVyaLHmFVn1+pIRywD02Xs7Xpo3A36CIx5S6NQ
         3e2w==
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=89fh+wLRXKFVjJIUjrcdKKSrKUkGbOeWAntspfrjE3Q=;
        b=FugCbCjcczh2BvL6WjSPhuZkYkdwFycQDq5729N9zt2CX31NhkTGSEHS+W/n9l7NPk
         Jc4Kdod5iHddD7Ummu++c8EDFg2ULam6yZPpxn4k+yT3Ju9dzJJ/5xnyvAi+jgnmq8xH
         TfrRxkf5AOxEtHsIVaYWOXpZocROL2xW5mXnuMwOxy9QKgTli5sTfpxVR4tDt47Jo+pd
         gR6H2PftjVQr0c1MS4U2fXlmQahjPozucpU2rMQIGgwYC6YpW/+H3dVTwnZFRqt2E4a+
         dmGj0Vqu0ctT3xxd0/25vQGrgPllTEg3Wu5QBR8osj8F5MveZGSWhgrTrmiNr+H+3UYA
         T4SA==
X-Gm-Message-State: ABUngvei4mgjc48iNw1pU3Rt3UM+R3g/wFVLOQsQ3fRjKAwgC6MWww5WqyePcQyW+cKkcg==
X-Received: by 10.28.63.201 with SMTP id m192mr68210wma.9.1477689358369;
        Fri, 28 Oct 2016 14:15:58 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.25.25.17 with SMTP id 17ls43857lfz.20.gmail; Fri, 28 Oct 2016
 14:15:57 -0700 (PDT)
X-Received: by 10.25.207.131 with SMTP id f125mr9581880lfg.181.1477689357194;
        Fri, 28 Oct 2016 14:15:57 -0700 (PDT)
Original-Received: from mail-lf0-x242.google.com (mail-lf0-x242.google.com. [2a00:1450:4010:c07::242])
        by mx.google.com with ESMTPS id d67si4679128lfg.201.2016.10.28.14.15.57
        for <std-proposals@isocpp.org>
        (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Fri, 28 Oct 2016 14:15:57 -0700 (PDT)
Received-SPF: pass (google.com: domain of andrey.semashev@gmail.com designates 2a00:1450:4010:c07::242 as permitted sender) client-ip=2a00:1450:4010:c07::242;
Original-Received: by mail-lf0-x242.google.com with SMTP id n3so4242802lfn.0
        for <std-proposals@isocpp.org>; Fri, 28 Oct 2016 14:15:57 -0700 (PDT)
X-Received: by 10.25.38.149 with SMTP id m143mr10048891lfm.107.1477688427207;
        Fri, 28 Oct 2016 14:00:27 -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 h99sm2277889lji.39.2016.10.28.14.00.26
        for <std-proposals@isocpp.org>
        (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Fri, 28 Oct 2016 14:00:26 -0700 (PDT)
In-Reply-To: <28223b1b-dd80-4055-acb0-aef52b6a228d@isocpp.org>
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::242 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:29225
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/29225>

On 10/28/16 23:46, T. C. wrote:
>
>
> On Friday, October 28, 2016 at 4:33:23 PM UTC-4, Matthew Woehlke
> wrote:On 2016-10-28 16:01, T. C. wrote:
>
>     > #pragma once (std :: vector :: foo :: bar :: 1.0).
>     >
>     > Where does the "qualified C++ identifier" end and where does
>     "version"
>     > begin?
>
>     Um... I think this would be an error; `1.0` isn't a valid identifier.
>
>
>
>     > Or are you saying that unlike actual "qualified C++ identifier"s,
>     > you can't have whitespace here?
>
>     I wasn't thinking about whitespace, actually... Okay, I see the
>     problem:
>
>       #once hello ::world
>
>     If we allow whitespace between 'parts' of the name, is that 'hello',
>     version '::world', or 'hello::world' with no version?
>
>     That's easy to fix; forbid the version starting with `:`. Maybe the
>     version doesn't even need `:`; that usually only shows up in
>     distribution package versions for unusual reasons related to
>     distribution packaging (that delve into the horribly complicated realm
>     of version number sorting).
>
>     I believe this makes the parsing simple: whitespace followed by
>     not-a-`:` separates the version from the name. Then we can also allow
>     (and ignore) whitespace around `::`.
>
>     Note: the version may *not* contain whitespace.
>
>
> That may work, but "version" as described can be several preprocessing
> tokens (1.0.1-1 is three: "1.0.1", "-", "1"), so you either need a
> special rule that says there can't be whitespace between those pp-tokens
> (unlike most other cases), or introduce a new type of preprocessing
> token formed only in #once, like header-names. Neither approach sounds
> particularly appealing to me compared to just using a string-literal.

Maybe just make the version an unsigned integer?

-- 
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/75abf111-7808-84df-be82-6fddcd5d1e8c%40gmail.com.

.
