From: Martin Bonner (Martin.Bonner_at_[hidden])
Date: 2007-04-04 05:01:04
[mailto:boost-bounces_at_[hidden]] On Behalf Of Edward Diener Sent:
03 April 2007 23:31 To: boost_at_[hidden]
Subject: Re: [boost] [system] Why is this not header-only?
> I think that the general reason for putting code in a library rather
> than a header file has not been touched upon, and that is that header
> files will have inline code as opposed to a library.
It will have lots of functions that are declared "inline".
> It is quite possible that inline code is not an issue and that the
> tradeoff of greater size for the slightly faster speed of inline code
Are you under the impression that having functions declared "inline"
means that the compiler will always inline them? Certainly for the
compiler I use (Visual C++) this is very far from the case. It will
inline small functions, but doesn't bother for larger ones. This does
mean the same function is present in many object files, but there will
be only one copy in the final exe (or rather, one copy in each exe and
dll that uses the function).
-- Martin Bonner Project Leader PI SHURLOK LTD Telephone: +44 1223 441434 / 203894 (direct) Fax: +44 1223 203999 Email: martin.bonner_at_[hidden] www.pi-shurlok.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk