220 14120 <4406713.Mls04kbNJi@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 07:52:02 -0700
Lines: 42
Approved: news@gmane.org
Message-ID: <4406713.Mls04kbNJi@tjmaciei-mobl4>
References: <3d0ab5b0-73d9-434a-9ae4-cd47d8275590@isocpp.org> <11313423.lvzWu67DM3@tjmaciei-mobl4> <CANPtknxEuDw=n4NoJiYKDH74kBbh=O_dvLgkGHJ-iS6b_eT+Cg@mail.gmail.com>
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 1413989534 25776 80.91.229.3 (22 Oct 2014 14:52:14 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Wed, 22 Oct 2014 14:52:14 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBCB4TK757YBRBFMJT6RAKGQEA3SLU2Q@isocpp.org Wed Oct 22 16:52:09 2014
Return-path: <std-proposals+bncBCB4TK757YBRBFMJT6RAKGQEA3SLU2Q@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-wg0-f72.google.com ([74.125.82.72])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBCB4TK757YBRBFMJT6RAKGQEA3SLU2Q@isocpp.org>)
	id 1XgxGh-0001oJ-B9
	for gclcip-std-proposals@m.gmane.org; Wed, 22 Oct 2014 16:52:07 +0200
Original-Received: by mail-wg0-f72.google.com with SMTP id m15sf2150191wgh.7
        for <gclcip-std-proposals@m.gmane.org>; Wed, 22 Oct 2014 07:52:07 -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=l02/UuS/igyctyAGz2towG4R61oaFHbb48NWoz46Sfc=;
        b=RIDWR5mKCZ08Xlfb6KkxlF3Zkp0S4UiTlZ0l0wJT0tEMc7AMrsK+DqguBeHgLHUMr+
         iY4ScktxU2JH7g4eQIl7OjparN6GpTX/OWCPKOWSXCajg+Oy7YPciKiy8IOKFd1lAaoe
         VkZgobEFWdO1eA2H4KH7rRsFjF0nA7DmpNQhB55y4RJkWAIGwK/Bq9GyZHJF7LSH6vNY
         0LKrfXjvX1Lrw0i7W5Vd7el5JZMYCjyrUYKTFrUTdeT2ZPKc2iSLVMZQWUKOgDMQVumx
         yDahpn8JWcd66omeiA0+Mv9JEsBmk7OCR6r5NJNsitKMDyWDdYWUafg/KCt8tNoThIx6
         L48Q==
X-Gm-Message-State: ALoCoQnA9piBJWAvRZLj1vmC+2Pl6aaYfoa/ucwL0eWXXrPt90CA11VF0ZfXQlhSF5CfzeAry4sp
X-Received: by 10.112.146.104 with SMTP id tb8mr23351lbb.22.1413989526912;
        Wed, 22 Oct 2014 07:52:06 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.152.7.142 with SMTP id j14ls20167laa.5.gmail; Wed, 22 Oct 2014
 07:52:05 -0700 (PDT)
X-Received: by 10.112.142.200 with SMTP id ry8mr42633646lbb.26.1413989525247;
        Wed, 22 Oct 2014 07:52:05 -0700 (PDT)
Original-Received: from gondolin.macieira.info (gondolin.macieira.info. [2a01:4f8:d13:f81:21c:14ff:fe01:12a3])
        by mx.google.com with ESMTP id lb6si23581548lac.111.2014.10.22.07.52.04
        for <std-proposals@isocpp.org>;
        Wed, 22 Oct 2014 07:52:04 -0700 (PDT)
Received-SPF: pass (google.com: domain of thiago@macieira.org designates 2a01:4f8:d13:f81:21c:14ff:fe01:12a3 as permitted sender) client-ip=2a01:4f8:d13:f81:21c:14ff:fe01:12a3;
Original-Received: from tjmaciei-mobl4.localnet (unknown [IPv6:2601:7:1c80:906:61e1:4e9c:40c8:6f6b])
	by gondolin.macieira.info (Postfix) with ESMTPSA id 3B74911B520
	for <std-proposals@isocpp.org>; Wed, 22 Oct 2014 07:52:04 -0700 (PDT)
User-Agent: KMail/4.14 (Linux/3.11.10-21-desktop; KDE/4.14.0; x86_64; ; )
In-Reply-To: <CANPtknxEuDw=n4NoJiYKDH74kBbh=O_dvLgkGHJ-iS6b_eT+Cg@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 2a01:4f8:d13:f81:21c:14ff:fe01:12a3
 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:14120
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/14120>

On Wednesday 22 October 2014 12:39:15 Peter Koch Larsen wrote:
> On 10/22/14, Thiago Macieira <thiago@macieira.org> wrote:
> > On Tuesday 21 October 2014 19:01:36 Myriachan wrote:
> >> Sure, but that's years off if ever, and there are billions of lines of
> >> code
> >> in projects using #pragma once now.
> > 
> > So why do we need to change anything? If that code is already working,
> > it's
> > working. If it's not working, then it won't magically begin working
> > tomorrow -- at best, it would become valid from next year on and projects
> > wishing compatibility would then begin using it in 2016 or 2017.
> > They may as well simply use include guards if they need compatibility.
> 
> I agree with Thiago. Even if both my compilers support the once pragma
> I stick to include guards. They work if you provide a meaningful name
> (I include my initials and the date of construction so something like
> ... _PKL_2014_10_22). I believe it would save me sixty seconds to
> write #pragma instead.
> If include guards make your compilation slow, you should complain to
> your vendor.

Just out of curiosity, why does it need to be that complex?

The include guard can be based on a rule of formation based on how the header 
itself gets #included. You can't have two of such files getting included in the 
same translation unit anyway.

-- 
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/.

.
