|
Boost : |
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:04:51
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.
>
> https://github.com/boostorg/timer/pull/5
Hi again,
I believe that Boost.Timer shouldn't define BOOST_CHRONO_HEADER_ONLY in
the src code.
See
https://github.com/boostorg/timer/pull/5/commits/98954984a4b55d01380bd8f18c884dc8519133ea
Vicente
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk