Boost logo

Boost :

From: Hubert HOLIN (Hubert.Holin_at_[hidden])
Date: 2002-05-10 17:15:55


[mailed and posted]

Paris (U.E.), le 11/05/2002

        Bonsoir

                Thanks for your contribution. As I am updating the quaternions and
octonions (with Fredrik Blomqvist's help), it would be best if I could
at the same time incorporate your changes. For various (and not very
good) reasons, it would be easier for me if you could send me a fully
modified set of files (rather than diffs or indications of "how-to").

                I would say, however, that MSVCPP is not the only compiler lacking
proper template template support, so a macro would be in order; I
actually suggested it a few month back (FWIW, for GCC 2.x, I test for
that compiler rather than for the deficiency).

        Merci

> Message: 14
> Date: Fri, 03 May 2002 12:57:22 +1000
> From: Michael Stevens <michael_at_[hidden]>
> To: boost_at_[hidden]
> Subject: [boost] math/special_functions/sinc and BOOST_NO_TEMPLATE_TEMPLATE_PARAMETERS.
> Reply-To: boost_at_[hidden]
>
> Two recent posting got me looking again an the Quaternion and special_functions library.
>
> Date: Mon, 29 Apr 2002 03:07:46 -0700 (PDT)
> From: Fredrik Blomqvist <f_blq_at_[hidden]>
> To: boost_at_[hidden]
> Subject: [boost] quat and oct ported to MSVC6
>
> Thanks for Fredrik it seems that it is fairly easy to get the Quaternion
> and Octonican libraries to work in MSVC6. I've taken the patch versions
> and check for compatibility under MSVC7. Then new quaternion.hpp and
> octonian.hpp are fine. However sinc.hpp and sinch.hpp are a little more
> ticky.
> Fredrik's solution to get them to work under MSVC is to remove the
> template template definition of sinc_pi using
>
> #ifndef BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS
> template<typename T, template<typename> class U>
> inline U<T> sinc_pi(const U<T> x)
>
> This works for MSVC6 but really is not quite correct as this isn't
> really the correct compiler deficiency.This is a template template non a
> dependant template type parameter. The problem is MSVC7 does support the
> latter but not the former! The question has come up very recently in a
> different context.
>
> From: "Gennadiy Rozental" <rogeeff_at_[hidden]>
> Date: Tue, 30 Apr 2002 01:19:36 -0400
> "David B. Held" <dheld_at_[hidden]> wrote in message
> news:aakfs8$ug3
>
> >> 2a. There doesn't appear to be any config macros for say,
> >> BOOST_NO_TEMPLATE_TEMPLATE_PARAMETERS.
> >No. this mean that Boost libraries are not using template template
> >parameters yet ( am I right?)
> >
> I think sinc(h).hpp may be the only place that template template
> parameters are used in BOOST. So maybe it is not appropraite to add yet
> another deficiency macro. A useful compromise that assumes that anything
> with the MSVC member template problem is also defincient for template
> templates (this included MSVC7) and that a future MSVC won't have ethe
> problem. I therefore propose the the following test in sinc(h).hpp
>
> #if !defined(BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS) &&
> !defined(BOOST_MSVC6_MEMBER_TEMPLATES)
>
> What does everyone think?
>
> The modifications to quaternion/octonian_test.cpp also need a bit of
> work for MSVC7. This compiler has the correct float./double versions of
> abs in math.h. Sadly they are only defined when /Za (disable microsoft
> extensions) is used!
> Therefore the following #if will allow a correct compile and excute test
> for MSVC7 with /Za set..
>
> // MSVC6 fails to provide an overloaded fp-abs()!
> #if (BOOST_MSVC <= 1200)
>
> I don't recommend compiling quatation/octonian in MSVC without /Za as
> all other occuranced of abs will only call the interger overload. Maybe
> we should as /Za into the boost build msvc-C++-action.
>
> Michael Stevens
> n


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