Re: [Boost-bugs] [Boost C++ Libraries] #766: "Bug" in comment (x2)

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #766: "Bug" in comment (x2)
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2007-08-19 15:39:10


#766: "Bug" in comment (x2)
---------------------------+------------------------------------------------
  Reporter: alexis_wilke | Owner: dlwalker
      Type: Bugs | Status: assigned
 Milestone: | Component: iostreams
   Version: None | Severity: Problem
Resolution: None | Keywords:
---------------------------+------------------------------------------------
Changes (by marshall):

  * component: None => iostreams
  * severity: => Problem

Old description:

> {{{
> This is very low priority!
>
> Hey guys,
>
> In this file:
>
> http://boost.org/boost/integer.hpp
>
> there is the following comment which says '9=unsigned
> long' and the code says '9=unsigned char'. Should
> someone get rid of that comment or fix it?
>
> // specializatons: 1=long, 2=int, 3=short, 4=signed
> char,
> // 6=unsigned long, 7=unsigned int, 8=unsigned
> short, 9=unsigned long
> // no specializations for 0 and 5: requests for a
> type > long are in error
> template<> struct int_least_helper<1> { typedef long
> least; };
> template<> struct int_least_helper<2> { typedef int
> least; };
> template<> struct int_least_helper<3> { typedef short
> least; };
> template<> struct int_least_helper<4> { typedef
> signed char least; };
> template<> struct int_least_helper<6> { typedef
> unsigned long least; };
> template<> struct int_least_helper<7> { typedef
> unsigned int least; };
> template<> struct int_least_helper<8> { typedef
> unsigned short least; };
> template<> struct int_least_helper<9> { typedef
> unsigned char least; };
>

> }}}

New description:

 {{{
 This is very low priority!

 Hey guys,

 In this file:

   http://boost.org/boost/integer.hpp

 there is the following comment which says '9=unsigned
 long' and the code says '9=unsigned char'. Should
 someone get rid of that comment or fix it?

   // specializatons: 1=long, 2=int, 3=short, 4=signed
 char,
   // 6=unsigned long, 7=unsigned int, 8=unsigned
 short, 9=unsigned long
   // no specializations for 0 and 5: requests for a
 type > long are in error
   template<> struct int_least_helper<1> { typedef long
 least; };
   template<> struct int_least_helper<2> { typedef int
 least; };
   template<> struct int_least_helper<3> { typedef short
 least; };
   template<> struct int_least_helper<4> { typedef
 signed char least; };
   template<> struct int_least_helper<6> { typedef
 unsigned long least; };
   template<> struct int_least_helper<7> { typedef
 unsigned int least; };
   template<> struct int_least_helper<8> { typedef
 unsigned short least; };
   template<> struct int_least_helper<9> { typedef
 unsigned char least; };


 }}}

--
Ticket URL: <http://svn.boost.org/trac/boost/ticket/766#comment:2>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.


This archive was generated by hypermail 2.1.7 : 2017-02-16 18:49:56 UTC