Subject: Re: [boost] [chrono][timer][release] Non-inline functions in inlined headers
From: Vicente J. Botet Escriba (vicente.botet_at_[hidden])
Date: 2017-12-14 10:51:36
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Â :
>> 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.
> 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.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk