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: Vicente J. Botet Escriba (vicente.botet_at_[hidden])
Date: 2011-12-20 03:15:17


Le 20/12/11 07:37, Belcourt, K. Noel a écrit :
>
> 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.
>
>
Thanks Noel. Could this simple workarround be applied by the Date
maintainers? Do you need a patch?

Best,
Vicente


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