Topic: Typo in proposed resolution for library defect report 303


Author: gennaro_prota@yahoo.com (Gennaro Prota)
Date: Fri, 6 Sep 2002 19:15:52 +0000 (UTC)
Raw View
On Thu, 5 Sep 2002 18:07:27 +0000 (UTC), dmh0xq001@sneakemail.com
(Alan Stokes) wrote:

>This issue concerns how bitset's input operator works. The proposed
>resolution includes adding the text
>
>"the next input character is neither is.widen(0) nor is.widen(1)"
>
>I believe that should be is.widen('0') and is.widen('1') - the
>character quotes are missing.

I was actually asking if the input operator is not *over*specified!
:-) Doesn't the specification requires using a string to implement it?
(At least this is what one could infer by reading the meaning of the
"Effects" item in the description of library functions - see
17.3.1.3).

Now, not only it would be possible to use e.g. a std::vector but also
not using any intermediate data structure at all, because the maximum
number of characters that can be extracted is known: so you can just
set/reset bits into the bitset starting from position size()-1 and
then shift the bitset itself to the right if less than size()
characters are extracted.


Genny.

---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.jamesd.demon.co.uk/csc/faq.html                       ]





Author: dmh0xq001@sneakemail.com (Alan Stokes)
Date: Thu, 5 Sep 2002 18:07:27 +0000 (UTC)
Raw View
This issue concerns how bitset's input operator works. The proposed
resolution includes adding the text

"the next input character is neither is.widen(0) nor is.widen(1)"

I believe that should be is.widen('0') and is.widen('1') - the
character quotes are missing.

- Alan

---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.jamesd.demon.co.uk/csc/faq.html                       ]