220 14140 <2027575.4qiFzyj4qf@tjmaciei-mobl4> article
Path: news.gmane.org!not-for-mail
From: Thiago Macieira <thiago@macieira.org>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: #pragma once
Date: Wed, 22 Oct 2014 15:44:49 -0700
Lines: 39
Approved: news@gmane.org
Message-ID: <2027575.4qiFzyj4qf@tjmaciei-mobl4>
References: <3d0ab5b0-73d9-434a-9ae4-cd47d8275590@isocpp.org> <67e8e595-bc97-496a-b656-474cb093b940@isocpp.org> <4039b7bf-7177-4863-ae3f-3b81b0cfb435@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
X-Trace: ger.gmane.org 1414017901 23705 80.91.229.3 (22 Oct 2014 22:45:01 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Wed, 22 Oct 2014 22:45:01 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBCB4TK757YBRBZPGUCRAKGQE4QLK23Q@isocpp.org Thu Oct 23 00:44:56 2014
Return-path: <std-proposals+bncBCB4TK757YBRBZPGUCRAKGQE4QLK23Q@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-wg0-f69.google.com ([74.125.82.69])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBCB4TK757YBRBZPGUCRAKGQE4QLK23Q@isocpp.org>)
	id 1Xh4eE-0001DH-TH
	for gclcip-std-proposals@m.gmane.org; Thu, 23 Oct 2014 00:44:54 +0200
Original-Received: by mail-wg0-f69.google.com with SMTP id b13sf2582470wgh.8
        for <gclcip-std-proposals@m.gmane.org>; Wed, 22 Oct 2014 15:44:54 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:from:to:subject:date:message-id:user-agent
         :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:content-type;
        bh=kedXL8/e75HkU4vsRXmV9cvmGCGOymrZWz8kQpe4UNg=;
        b=erDm8ds6sDV04wgS5ra4vs1A5E3WUWd0XzzQgfUltN60mh8PbSbi+xyQudv4tYe3LG
         NUQu2sDU+KC4nqIAev+m/Lx9NEu1itSm1T4QSCPHh2V8zTsIGl/9DQFMv5SFU04CAqTw
         AwXDU8Sq64t4hPXGh11mRg7kvNqKiOF8kRyfBtNcfu0NGISaQfmYy9HPEnfl50VyqFME
         Mkek/VVOXK3YnvEvagsKwAJiiHOAxTKu3GpUv3i5sVPokbR4e501dTCHCeHQsENbDQbI
         LrL2WUibIcmbq0rm7Y7PugTcJFxHQvHK6A7D2p8OYeULdbr6+YZ37Sr08iUGlhChYfbS
         z8kQ==
X-Gm-Message-State: ALoCoQkZASMpXYj6VvarxH6DbK70GIdsYHcxiFmlwk3sZbxCj20mhp937hFGkoVvE/EPeaB62oaR
X-Received: by 10.181.11.130 with SMTP id ei2mr1529908wid.3.1414017894500;
        Wed, 22 Oct 2014 15:44:54 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.152.37.1 with SMTP id u1ls273173laj.29.gmail; Wed, 22 Oct 2014
 15:44:52 -0700 (PDT)
X-Received: by 10.112.38.67 with SMTP id e3mr1101769lbk.6.1414017892556;
        Wed, 22 Oct 2014 15:44:52 -0700 (PDT)
Original-Received: from gondolin.macieira.info (gondolin.macieira.info. [78.47.120.188])
        by mx.google.com with ESMTP id l5si104239lag.57.2014.10.22.15.44.52
        for <std-proposals@isocpp.org>;
        Wed, 22 Oct 2014 15:44:52 -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-mobl4.localnet (jfdmzpr02-ext.jf.intel.com [134.134.137.71])
	by gondolin.macieira.info (Postfix) with ESMTPSA id 70B7C11B5DA
	for <std-proposals@isocpp.org>; Wed, 22 Oct 2014 15:44:51 -0700 (PDT)
User-Agent: KMail/4.14 (Linux/3.11.10-21-desktop; KDE/4.14.0; x86_64; ; )
In-Reply-To: <4039b7bf-7177-4863-ae3f-3b81b0cfb435@isocpp.org>
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.mail=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: <http://groups.google.com/a/isocpp.org/group/std-proposals/post>, <mailto:std-proposals@isocpp.org>
List-Help: <http://support.google.com/a/isocpp.org/bin/topic.py?topic=25838>, <mailto:std-proposals+help@isocpp.org>
List-Archive: <http://groups.google.com/a/isocpp.org/group/std-proposals/>
List-Subscribe: <http://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>,
 <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:14140
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/14140>

On Wednesday 22 October 2014 14:27:56 Myriachan wrote:
> I would specify #pragma once's behavior to be unspecified (but either 
> include or not include) in the event that the implementation cannot 
> reliably determine whether two files coincide.  If you want your code to 
> work, don't create a situation where you expect a file to not be 
> double-included when the codebase accesses it through two different mount 
> points for which the OS cannot identify them as identical or overlapping.

Sorry, but I don't think that's useful. If you leave the behaviour unspecified, 
it isn't useful because we can't guarantee it will work.

I can't mandate where people should store my source code. Therefore, I can't 
guarantee that the source code I write will work on their computers. That 
means the feature is useless.

> Sometimes #include guards have problems.  You can easily run into cases 
> where two unrelated headers think they're both the same name.

That can't happen, since you can't #include two different headers with the same 
name (#include_next doesn't count).

Each include should have its canonical #include mechanism. If you a header is 
#include'd with <module/header.h>, then the include guard should have both the 
words "module" and "header" in the include guard.

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel Open Source Technology Center
      PGP/GPG: 0x6EF45358; fingerprint:
      E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358

-- 

--- 
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.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/.

.
