Boost logo

Boost :

Subject: Re: [boost] Proposal for #pragma once support
From: Zachary Turner (divisortheory_at_[hidden])
Date: 2009-06-11 14:15:57


On Thu, Jun 11, 2009 at 12:51 PM, Emil Dotchevski
<emildotchevski_at_[hidden]>wrote:

> On Thu, Jun 11, 2009 at 1:34 AM, John Maddock<john_at_[hidden]>
> wrote:
> >> I'm not sure you got my drift, using BOOST_WORKAROUND effectively
> >> flags the better #pragma once performance on MSVC as a bug. :)
> >
> > Sure, but it requires #including boost/workaround.hpp in every header,
> which
> > is surely not such a great idea?
> >
> > In fact wouldn't the extra #includes outweigh the use of pragma once?
>
> Yeah, I wast mostly joking :) but then again, in my mind improving
> build times by using pragma once is a joke too. If we want to deal
> with the problem of slow builds we should be removing stuff from
> headers, instead of making it easier to swallow all that crap.
>

Even if we do remove a bunch of stuff from headers, it can still be made
faster. Now matter how many ways you approach the problem, choosing to
ignore one specific way that actually makes a serious difference simply
because it only works on a subset of compilers is fundamentally inconsistent
with the notion of developing a cross platform C++ library that works on
every compiler. In an ideal world(?), every compiler for every platform
would be 100% standards compliance and provide 0 compiler specific
extensions. Then the issue wouldn't come up at all. But a fact of life
when developing for multiple compilers is that you have to deal with
compiler specific quirks.

I disagree with the notion that MSVC is "fundamentally a joke" (paraphrased)
as others have put it simply because it provides a compiler extension via
the *C++ standard* way of providing compiler extensions. GCC, while a great
compiler, has its quirks too. There are compiler specific newsgroups to
nitpick about what you love / hate about specific compilers, but in the
meantime the purpose here is to solve real world problems people face when
using boost with whatever compiler it is they're using.

It's easy to downplay the importance of fast build times. But it's not so
easy anymore once you've worked on a product for which it is actually
impossible to do nightly builds because it takes longer than a night to
complete a build.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk