|
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-06-28 06:45:50
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.
Cheers,
Kris.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk