Boost logo

Boost :

From: Michael Roach (mcr_at_[hidden])
Date: 2001-12-06 10:49:05


That's my feeling too. I have started to refactor my code so that the only place these ms-headers get pulled in is in the actual component implementation and not its header.

Seems to be the cleanest means to an end.

----- Original Message -----
  From: David Abrahams
  To: boost_at_[hidden]
  Sent: Thursday, December 06, 2001 7:39 AM
  Subject: Re: [boost] including platform specific headers

  Considering that the Microsoft headers contain all sorts of macro names that
  are supposed to be reserved for users, I usually try very hard to keep them
  out of my headers.

  Long ago I wished that someone would write a simple static library which
  exposes all of the same names inside a namespace, and saves users from the
  effects of "global name grabbing".

  -Dave

  ----- Original Message -----
  From: "Michael Roach" <mcr_at_[hidden]>
  To: <boost_at_[hidden]>
  Sent: Thursday, December 06, 2001 2:27 AM
  Subject: [boost] including platform specific headers

> I'm working on a project that for the first time has application outside
  of
> the Microsoft world and am wondering how others handle the situation of
> keeping their component headers standalone while at the same time not
> pulling in the entire world for that platform.
>
> As an example, given the version API that Microsoft exposes in
  version.lib,
> you need declarations in shlwapi.h and winver.h -- both of which are
  usually
> included via windows.h - in addition to the typedefs introduced by
  windef.h.
>
> Not wanting to force the user of my components to remember to include
> windows.h before mine, is it considered O.K. to include all the required
> header files directly (not via windows.h) even if the supplying vendor
> doesn't recommend it (i.e., windef.h)?
>
> I seem to remember there being a long discussion on c.l.c++.m about *not*
> doing this by testing against the include guards used in the headers in
> question. If that's the case, and its frowned upon, how else might you do
> it?
>
> I've gotten many differing opinions from coworkers but no clear consensus
> and was wondering how boosters felt about it.
>
> Thanks,
> Mike
>
>
> Info: http://www.boost.org Send unsubscribe requests to:
  <mailto:boost-unsubscribe_at_[hidden]>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>

  Info: http://www.boost.org Send unsubscribe requests to: <mailto:boost-unsubscribe_at_[hidden]>

  Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/



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