
On 01/22/2012 12:00 PM, Vicente J. Botet Escriba wrote:
Le 22/01/12 03:37, Beman Dawes a écrit :
On Sat, Jan 21, 2012 at 5:29 PM, Vicente J. Botet Escriba <vicente.botet@wanadoo.fr> wrote:
...
Ihave found that a little patch to Boost.System could make it header-only. It seems that Beman has already tried it, but there are some errors. I'd like to make Boost.System available for header-only use, but IIRC the suggested changes broke some other libraries that use Boost.System. Please, could you point me to which libraries are you referring to? Also, I'd like to see a Boost guideline worked out for how to make libraries header only without dumping vast numbers of names for operating system headers into the global namespace.
I recognize that it could be difficult for libraries as Boost.Thread or Boost.FileSystem, but I don't think Boost.System will be on this case as its dependency are really minor, isn't it? Could you explain more deeply the problem you want to avoid?
error_code.cpp includes windows.h and puts lots of symbol in the global namespace. I'm not sure #include "local_free_on_destruction.hpp" works either in a scenario where the file is included. So there are problems with the approach of including .cpp files as-is, and a better approach must be found.