Opened 11 years ago
Last modified 11 years ago
#6442 new Feature Requests
Let the user work with a header-only library
Reported by: | viboes | Owned by: | Beman Dawes |
---|---|---|---|
Milestone: | To Be Determined | Component: | system |
Version: | Boost 1.48.0 | Severity: | Problem |
Keywords: | Cc: | ulrich.eckhardt@… |
Description
Many libraries using Boost.System directly or indirectly could find more user if Boost.System were a header-only library.
Attachments (2)
Change History (4)
comment:1 by , 11 years ago
comment:2 by , 11 years ago
Cc: | added |
---|
There is also #3103 which doesn't require a macro but takes the approach that you include a file instead.
Note:
See TracTickets
for help on using tickets.
Next follows a patch. The user need to define BOOST_SYSTEM_INLINED to have a header-only lib. By default the windows files are taken from boost/detail/win32. The user needs to define BOOST_USE_WINDOWS_H if he has a preference for the windows files.
I have tested it for Boost.System, Boost.Chrono and Boost.Thread on cygwin gcc-4.3.4 and mingw gcc-4.6.1 (and c++0x) and msvc 10. Boost Chrono uses it as a header only, Boost.Thread as a linked library. I will continue the test with other Boost libraries.