Boost logo

Boost :

From: Scott Schurr (scott_schurr_at_[hidden])
Date: 2005-10-14 19:30:05


Markus Sch?pflin <markus.schoepflin_at_[hidden]> wrote:

> Tried on Tru64 5.1, CXX 7.1-006:
>
> > cxx -model ansi -std strict_ansi -I boost-HEAD binary_int_test.cpp
>
> cxx: Error: binary_int.hpp, line 51: incomplete type is not allowed
> binary_nibble_VALID_VALUES_BINARY_0000_THROUGH_1111<false> t;
> ---------------------------------------------------------------^
> cxx: Warning: binary_int.hpp, line 101: trailing comma is nonstandard
> shl = 4u,
> ------------------^
> cxx: Warning: binary_int.hpp, line 109: trailing comma is nonstandard
> shl = 0u,
> ------------------^
> cxx: Warning: binary_int.hpp, line 191: trailing comma is nonstandard
> v0_ = (v1_ << binary_int_arg<b0>::shl) | binary_int_arg<b0>::value,
> -----------------------------------------------------------------------------^
> cxx: Warning: binary_int.hpp, line 171: missing return statement at end of
> non-void function "binary_int<b15, b14, b13, b12, b11, b10, b9, b8,
> b7, b6, b5, b4, b3, b2, b1, b0>::operator="
> binary_int& operator=(const binary_int& rhs) { };
> ---------------------------------------------------^
> cxx: Info: 1 error detected in the compilation of "binary_int_test.cpp".

I have attempted fixes for these errors.

 1. I removed the BOOST_WORKAROUND, and made what was the BOOST_WORKAROUND
    the only behavior.

 2. I removed trailing commas at the end of three enum definitions.
 
 3. I removed the assignment operator definition from the protected
    section.

I am hoping that with these changes the template will survive
appropriately picky compilers with no warnings or errors. Unfortunately
I can't verify my changes because my compilers are passing both the old
and new versions of the template.

I have uploaded the new version of the zip to the sandbox:

  http://boost-consulting.com/vault/

under the name binary_int.

I hope that I actually improved the template :-). I'm sure I'll hear.

Thanks. And thanks for your efforts on the review.

Scott Schurr


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