Boost logo

Boost :

Subject: Re: [boost] [ratio] error in template specialization: template parameter n1 depends on another template parameter
From: Krzysztof Czainski (1czajnik_at_[hidden])
Date: 2012-07-04 05:59:33


2012/6/28 Krzysztof Czainski <1czajnik_at_[hidden]>

> 2012/6/27 Vicente J. Botet Escriba <vicente.botet_at_[hidden]>
>
> Le 27/06/12 15:27, Krzysztof Czainski a écrit :
>>
>> Hello,
>>>
>>> In order to use Boost.Ratio with my poor compiler from TI, I had to apply
>>> the attached fix.
>>>
>> Have you reached to run the regression test after applying your patch?
>
> No.
>
>>
>> I suspect a more general fix would be desirable, should such a fix be
>>> added
>>> to Boost. However, before investigating further, I'd like to ask, if
>>> such a
>>> fix would be welcome, or is my compiler too poor to be supported by
>>> Boost.Ratio?
>>>
>> Yes, of course, I will apply a patch that works for you. The patch needs
>> however to be applied conditionally to some define your compiler defines
>> specifically. Something like
>>
>> #ifndef __TI__
>>
>> template< typename T1, T1 n1, bool n1_is_0, typename T2, T2 n2, bool
>> n2_is_0 >
>> #else
>> template< typename T1, intmax_t n1, bool n1_is_0, typename T2, intmax_t
>> n2, bool n2_is_0 >
>> #endif
>>
>> and some documentation talking about the limitation should be added as
>> well.
>>
>
> Ok, then I will try to look into this later, understand more how these
> templates are used, and propose a patch.
>
> This will not be the first workaround for this compiler that I propose. I
> think it was once suggested to use something like BOOST_WORKAROUND. I will
> try to look into that approach too.
>
>>
>> Please could you add a Trac ticket?
>>
>
> Yes, I will do that.
>

Ticket no. 7075.
Kris


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