|
Boost : |
From: Alexander Nasonov (alnsn_at_[hidden])
Date: 2007-06-04 02:57:02
I'm trying to fix floating_point_promotion. The template is very simple,
it transforms cv qualified float to cv qualified double but borland
doesn't understand cv specializations.
Since I don't remember how to workaround borland problems, I rely on MPL.
I wrote the following
template<class T>
struct floating_point_promotion
: mpl::at<
mpl::vector< T, double, double const, double volatile,
double const volatile >
, mpl::plus<
is_same<T, float>
, mpl::multiplies< is_same<T, float const> , mpl::int_<2> >
, mpl::multiplies< is_same<T, float volatile> , mpl::int_<3> >
, mpl::multiplies< is_same<T, float const volatile>, mpl::int_<4> >
>
>
{
};
I don't know why, but borland 5.1.1 strips cv from float so float const
is promoted to double (without const). Can someone with access to borland
later than deprecated 5.1.1 check promote_basic_test.cpp ?
The patch is attached.
-- Alexander Nasonov http://nasonov.blogspot.com I`m never going to be famous. My name will never be writ large on the roster of Those Who Do Things. I don`t do any thing. Not one single thing. I used to bite my nails, but I don`t even do that any more. -- Dorothy Parker -- This quote is generated by: /usr/pkg/bin/curl -L http://tinyurl.com/veusy \ | sed -e 's/^document\.write(.//' -e 's/.);$/ --/' \ -e 's/<[^>]*>//g' -e 's/^More quotes from //' \ | fmt | tee ~/.signature-quote
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk