Boost logo

Boost :

From: helmut.zeisel_at_[hidden]
Date: 2001-10-14 14:46:15


--- In boost_at_y..., "Eric Ford" <eford_at_m...> wrote:
> Thanks. I tried with gcc 2.95...
>
> preprocessor directives should start on the first collum
>
> gcc didn't like an #if being extended over two lines with a \
>
> gcc doesn't seem to have a locale include file. Obvioulsy, that
> creates many problems. Does anyone know a work around for this?
>

With the changes below
I could compile with gcc 3.0.1

As I understand, the added namespace specification is correct.
Whether the removed "template<>" is correct, however,
I am not so sure.
The gcc 3.0.1 error message is

explicit specialization in non-namespace scope `class
   boost::decimal<Precision>'

Maybe the correct solution is to move the specialization
to a different place.

Helmut

@@ -172,7 +172,7 @@
 };

 #ifndef BOOST_DEFAULT_ROUNDING_MODE
-#define BOOST_DEFAULT_ROUNDING_MODE bankers_round
+#define BOOST_DEFAULT_ROUNDING_MODE ::boost::bankers_round
 #endif
 
 //

@@ -348,7 +348,7 @@
   #if !defined(BOOST_NO_INCLASS_MEMBER_INITIALIZATION)
 
     static const bool is_integer = false;
- static const float_round_style round_style = round_indeterminate;
+ static const ::std::float_round_style round_style =
round_indeterminate;
 
   #else
 
@@ -659,7 +659,7 @@
         return *this;
     }
 
- template<>
+ // template<>
     decimal<Precision>& operator+=(const decimal<Precision>& rhs)
     {
         val += rhs.val;
@@ -678,7 +678,7 @@
         return *this;
     }
 
- template<>
+ // template<>
     decimal<Precision>& operator-=(const decimal<Precision>& d)
     {
         val -= d.val;
@@ -762,7 +762,7 @@
     {
         return lt(rhs.one, rhs.val);
     }
- template<> bool operator<(const decimal<Precision>& rhs) const
+ /*template<>*/ bool operator<(const decimal<Precision>& rhs) const
     {
         return this->val < rhs.val;
     }
@@ -771,7 +771,7 @@
     {
         return eq(rhs.one, rhs.val);
     }
- template<> bool operator==(const decimal<Precision>& rhs) const
+ /*template<>*/ bool operator==(const decimal<Precision>& rhs) const
     {
         return this->val == rhs.val;
     }


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