Boost logo

Boost :

Subject: Re: [boost] [EXTERNAL] [date_time] gcc 3.4.6 - int_adapter<T>::from_special(special_values) is not inlined, so duplicated (#6302)
From: Belcourt, K. Noel (kbelco_at_[hidden])
Date: 2011-12-20 01:37:40


On Dec 19, 2011, at 5:13 PM, Vicente J. Botet Escriba wrote:

> It seems that this function
>
> template<typename int_type_>
> class int_adapter {
>
> static int_adapter from_special(special_values sv)
> {
> switch (sv) {
> case not_a_date_time: return not_a_number();
> case neg_infin: return neg_infinity();
> case pos_infin: return pos_infinity();
> case max_date_time: return (max)();
> case min_date_time: return (min)();
> default: return not_a_number();
> }
> }
>
> is not been inlined with gcc 3.4.6 and so it is duplicated at link
> time. See link error on regression test

The only fix I know is to replace the switch statement with an if /
else block.

-- Noel


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk