http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58729

            Bug ID: 58729
           Summary: tr2::dynamic_bitset::resize fails
           Product: gcc
           Version: 4.8.1
            Status: UNCONFIRMED
          Severity: minor
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: kwbent at uab dot edu

Created attachment 31004
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=31004&action=edit
output from compilation

using g++ (Debian 4.8.1-10) 4.8.1
Debian testing x64

I've been investigating the dynamic_bitset part of the tr2 specification.  I've
used boost's dynamic bitset, so I was basing the functionality from that. 
Either I'm using the resize function wrongly, or it's failing to set the bits
as indicated.

When using the resize(number of bits, value), the resize seems to work fine,
but the value is ignored.  I started to dig around; the resize function is
defined as this in the header <tr2/dynamic_bitset>

      void
      resize(size_type __nbits, bool __value = false)
      {
    this->_M_resize(__nbits, __value);
    this->_M_Nb = __nbits;
    this->_M_do_sanitize();
      }

Is the value being defaulted to false, regardless of the input?  The actual
main() is at the end of the main.ii file.  Another oddity is that this will not
compile from the command line, but will from inside netbeans where I code, even
with Wall and Wextra specified.

If more info is needed, I'll oblige.

Reply via email to