220 29232 <nv1vv4$s3h$1@blaine.gmane.org> article
Path: news.gmane.org!.POSTED!not-for-mail
From: Bo Persson <bop@gmb.dk>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: pragma once
Date: Sat, 29 Oct 2016 13:08:23 +0200
Lines: 52
Approved: news@gmane.org
Message-ID: <nv1vv4$s3h$1@blaine.gmane.org>
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>
 <fe951191-2e5b-654f-41c5-577a3e106423@gmail.com> <58136277.409@gmail.com>
 <C4538732-F048-44AA-993A-42A7C0BE38B0@gmail.com> <58137760.6070202@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
Content-Transfer-Encoding: quoted-printable
X-Trace: blaine.gmane.org 1477739351 20246 195.159.176.226 (29 Oct 2016 11:09:11 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Sat, 29 Oct 2016 11:09:11 +0000 (UTC)
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101
 Thunderbird/45.4.0
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBCZ6RLW3UIKBBQMG2LAAKGQENDZIB4I@isocpp.org Sat Oct 29 13:09:06 2016
Return-path: <std-proposals+bncBCZ6RLW3UIKBBQMG2LAAKGQENDZIB4I@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+bncBCZ6RLW3UIKBBQMG2LAAKGQENDZIB4I@isocpp.org>)
	id 1c0RVH-0002Kf-75
	for gclcip-std-proposals@m.gmane.org; Sat, 29 Oct 2016 13:08:47 +0200
Original-Received: by mail-lf0-f71.google.com with SMTP id f134sf22535625lfg.6
        for <gclcip-std-proposals@m.gmane.org>; Sat, 29 Oct 2016 04:08:50 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=to:from:subject:date:lines:message-id:references:mime-version
         :content-transfer-encoding:user-agent: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=3NnsHa+bnMz5F+qhTr4z4ESDfLRdRbHu2Rssq7+U/wc=;
        b=NiAl5NhpXgbBxOw6ewnAl1axTcHJ+1Rx+h1U23oih7rIyfdCeQ6KQXRy8CpoQjJqfL
         hMAmzxIhurPcdFGhkZSsAVNMYOWhqF8MvIqvOankd41m/TyS7Lj7yCCnQdVbXwPrKEak
         ZU1H6TmMDcdXURDlhJFufw8i4BtDEMF4oyjNqv1TLWmrp/MWUlDaYT8G+FjVDaidDMH5
         9ZHDqJe9Stlo77Wb/Ht5D8qptRpwnmlig7k6QiQ0Ifw2XWk7Xx1/YiQeTXVvgYhgP1zx
         8UhcsxOADE680ZN4OFweUtIw16658yelCVoHVZMOOdNg1Mao8RUmPPaz6wVrRRIYhXJe 
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:to:from:subject:date:lines:message-id:references
         :mime-version:content-transfer-encoding:user-agent: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=3NnsHa+bnMz5F+qhTr4z4ESDfLRdRbHu2Rssq7+U/wc=;
        b=Go8m7GKko6F5vaxHor8nJHk9sYhC/deyESQthaXKUL/x8yfASIyonCdNTU6ROhNo5S
         1fDqF5WsUZpHJntKqZVdt555iu2jgPOcRK89+J4lNaHhhxWz2xDy2r8iojg2nmzO4hPU
         J9Vm5fOb3Pz3IGehjzOMt7uysr7MO2GuR78ljtDnnDq1YCeGoa4kyB6wiwOduDwR568R
         X2VXI+vSpy5af3Xinbdirqv3THAb2QLN2Ko7ltstCHYlwCSSks7PabTq5HJ25YtPwxdf
         ueD7LIBE0Z7anY8UnMHi0irgp2Ki6ZEBKqWYPRJvSDFRWjRjnfowtYCy47bt/QRt 
X-Gm-Message-State: ABUngvdw++5ghIXgsPvOckPyxVSSW8l+vzWnOHIVkhIWeAnzA7E8odHbRioYvZXX6fpssA==
X-Received: by 10.25.16.93 with SMTP id f90mr1538896lfi.30.1477739330038;
        Sat, 29 Oct 2016 04:08:50 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.25.44.20 with SMTP id s20ls643976lfs.13.gmail; Sat, 29 Oct
 2016 04:08:48 -0700 (PDT)
X-Received: by 10.25.150.148 with SMTP id y142mr12796156lfd.85.1477739328893;
        Sat, 29 Oct 2016 04:08:48 -0700 (PDT)
Original-Received: from blaine.gmane.org ([195.159.176.226])
        by mx.google.com with ESMTPS id m127si15052lfa.243.2016.10.29.04.08.48
        for <std-proposals@isocpp.org>
        (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Sat, 29 Oct 2016 04:08:48 -0700 (PDT)
Received-SPF: neutral (google.com: 195.159.176.226 is neither permitted nor denied by best guess record for domain of gclcip-std-proposals@m.gmane.org) client-ip=195.159.176.226;
Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2)
	(envelope-from <gclcip-std-proposals@m.gmane.org>)
	id 1c0RVC-0001k2-Kg
	for std-proposals@isocpp.org; Sat, 29 Oct 2016 13:08:42 +0200
X-Injected-Via-Gmane: http://gmane.org/
Original-Lines: 41
Original-X-Complaints-To: usenet@blaine.gmane.org
In-Reply-To: <58137760.6070202@gmail.com>
X-Original-Sender: gclcip-std-proposals@m.gmane.org
X-Original-Authentication-Results: mx.google.com;       spf=neutral
 (google.com: 195.159.176.226 is neither permitted nor denied by best guess
 record for domain of gclcip-std-proposals@m.gmane.org) smtp.mailfrom=gclcip-std-proposals@m.gmane.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:29232
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/29232>

On 2016-10-28 18:05, Matthew Woehlke wrote:
> On 2016-10-28 11:02, Miro Knejp wrote:
>> On 28 Oct 2016, at 16:36 , Matthew Woehlke wrote:
>>> On 2016-10-27 19:48, Miro Knejp wrote:
>>>> It unfortunately doesn't solve the problem of having to come up wth a
>>>> guard that is unique within the multiverse. For example boost_date_tim=
e
>>>> has an include guard called ISO_FORMAT_HPP___. That's not exactly the
>>>> most unique guard in the world. The less this relies on human
>>>> (non-)creativity or discipline the better.
>>>
>>> Um...
>>>
>>>  #once boost::date_time::iso_format
>>>
>>> QED.
>>>
>>> I also suggested that compilers *might* be able to go as far as warning
>>> if the namespace of the guard "looks suspicious". It *will* squawk at
>>> you if you get the `iso_format` part wrong.
>>
>> If you can specify a behavior that is consistent and won=E2=80=99t annoy
>> anyone, sure.
>
> The unqualified name shall match the basename of the included file.
> (There are some corner cases, but since this is a non-mandated
> diagnostic, we can figure them out as they come. If the include is via a
> pipe or something strange, this check would likely be skipped, which is
> somewhat unfortunate, but no worse than the current situation.)
>

Some of the corner cases are that the mapping from the physical source=20
file to the source character set, as well as the mapping from=20
#include-names to file names, are both implementation-defined. One or=20
more of those could be EBCDIC, for example.

Also, the base name "iso_format" might no be allowed as a file name=20
because of OS restrictions (length and/or allowed characters).


    Bo Persson


--=20
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 e=
mail 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/nv1vv4%24s3h%241%40blaine.gmane.org.

.
