Boost logo

Boost :

Subject: Re: [boost] Should Boost adopt pimpl/d-pointer as much as it can?
From: DE (satan66613_at_[hidden])
Date: 2010-03-23 13:24:11


on 23.03.2010 at 1:22
 Josh Faust wrote :
>> i strongly diagree with you
>> i think one should strive to make his library open to as many users as
>> it is possible, not only pro developers
>> [blah blah blah]
> A lot of professional developers (and corporations) refuse to use boost
> because of the increased compile times in client code. Focusing on people
> who are not comfortable linking against other libraries (a pretty
> fundamental part of C/C++ development) to me focuses on the entirely wrong
> set of developers.

> [Boost.Thread vs. pthreads compilation example]

was that an argument?
if so i say that separating declaration and implementation for non
template code is a natural practice in C and C++ development
i.e. declaration -- in headers (*.h), implementation -- in *.cpp or *.c
personally i like the compile-once-link-any-time-you-want principle

especially it fits well with msvc set of tools
once you have a lib and the header you can put a file in your /include
dir with the following contents

  //file "universe_formula"
  #include "path_to_actual_header/formula.h"
  #ifdef NDEBUG
  #pragma comment(lib, "universef.lib")
  #else
  #pragma comment(lib, "universefd.lib")
  #endif

  
now if you

  #include <universe_formula>
  
linker will be automatically informed about the package with symbols
to resolve
oh and i forgot that you need to put the .lib file(s) in your
per project/global /lib dir

-- 
Pavel

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