Le 14/12/2017 à 10:52, Vicente J. Botet Escriba via Boost a écrit :
Le 13/12/2017 à 11:24, Daniel James via Boost a écrit :
Hi,
We've had a link problem reported. for this code on Visual Studio, using auto-linking:
#include "boost\chrono.hpp" #include "boost\timer\timer.hpp"
int main() { auto now = boost::chrono::steady_clock::now(); boost::timer::cpu_timer cput; return 0; }
I haven't got the binaries installed yet, so I haven't reproduced it, but I think it's caused because timer now includes the chrono headers using BOOST_CHRONO_HEADER_ONLY, and in the chrono inlined headers not all functions are BOOST_CHRONO_INLINE. It looks like this problem was always in chrono, but BOOST_CHRONO_HEADER_ONLY was widely used enough for it to be detected.
I'd quite like to fix this for 1.66.0, which requires either reverting the change to timer, or fixing the problem in chrono. The error is in chrono, but I'm more inclined to revert the change in timer for this release, as it's a less disruptive way of quickly fixing the problem.
Hi,
Sorry, I forgot completely about BOOST_CHRONO_INLINE.
I see two uses of inline
mac/process_cpu_clocks.hpp: inline long tick_factor() // multiplier to convert ticks posix/process_cpu_clocks.hpp: inline nanoseconds::rep tick_factor() // multiplier to convert ticks This is not the source of any trouble, isn't it?
Sorry for the noise. Vicente