
On Oct 13, 2012 2:02 AM, "Vicente J. Botet Escriba" < vicente.botet@wanadoo.fr> wrote:
Note that Boost.Chrono could be configured as a header only library. AFAIR, it's not the default, so most if not all distributions include it as a binary. You are right and now that I the dependency to Boost.System is also
Le 13/10/12 08:22, Andrey Semashev a écrit : header only I'm thinking to change the default.
Is the header-only version equivalent to the compiled one? I will say yes.
BTW, Boost.Thread depends also on Boost.System. Do you avoid already this dependency?
No, Boost.System is also used by Boost.Filesystem and Boost.ASIO, which I also use. And I probably catch and throw Boost.System exceptions somewhere in my code as well. This is also the case for Boost.Thread so the dependency to the binary is unavoidable for now.
Me too, I want to limit dependencies :) Fair enough. Perhaps, we could absract away Boost.Thread from both libraries? Seems like a logical solution for a case like this.
For example, Boost.Thread could define an internal interface for integrating with time units from different libraries. Chrono and DateTime would support this interface, and Boost.Thread could also provide the necessary glue for std::chrono integration. I think, Boost.Thread could use its own time units internally and use ADL-found functions to convert from other time units. Boost.Thread will not depend on either timing library then. Does this look viable? This could be possible but this is not a priority for me, if you want to provide a patch I will integrate it if the design is simplified, but I don't see how you could provide the time related function with the Boost.Chrono interface in this case.
Ok, I will create a Trac ticket then and see what I can do. Thanks, Vicente