Boost logo

Boost :

From: Michael Roach (mcr_at_[hidden])
Date: 2001-12-06 02:27:17


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


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