
----Original Message---- From: boost-bounces@lists.boost.org [mailto:boost-bounces@lists.boost.org] On Behalf Of Julio M. Merino Vidal Sent: 03 April 2007 17:00 To: boost@lists.boost.org Subject: Re: [boost] [system] Why is this not header-only?
On 02/04/2007, at 19:11, Andrey Semashev wrote:
Although the discussion is slipping away from the original question, I must say I 100% agree with Jeff. The best solution is to give user a choice whether to link or to go header-only (where possible). And in my opinion such solution should be unified for all boost libs. We already have the BOOST_USE_WINDOWS_H macro, why not extend it to something like BOOST_USE_OS_NATIVE_HEADERS? I think this would settle the problem once and for all. The only problem is I'm not sure how such a transition should be organized.
Although I liked this at first too, it seems to me it cannot be always implemented. I was now trying to add a singleton to my library and I can't do it with headers alone. I need to maintain the pointer to the global instance somewhere, and that means having a global variable which cannot be defined in a header (or otherwise you'll get duplicates). Unless I'm missing something, that is...
Static variable in an inline function. -- Martin Bonner Project Leader PI SHURLOK LTD Telephone: +44 1223 441434 / 203894 (direct) Fax: +44 1223 203999 Email: martin.bonner@pi-shurlok.com www.pi-shurlok.com