Menu

#387 size_type not declared in <vector>

v1.0 (example)
open
nobody
None
5
2014-05-01
2014-03-15
No

fails with this test file in
4.9.0 experimental personal
4.8.2 latest (maybe any 4.8.2) personal

1 Attachments

Discussion

  • Jim Michaels

    Jim Michaels - 2014-03-15

    std::vector::size_type doesn't work either. I looked at the library source and for some reason it's broken.

     
  • Jim Michaels

    Jim Michaels - 2014-03-15

    correction, std::vector<int>::size_type works, but should this be necessary? according to this, and this, it should not be.
    f:\x86_64-4.9.0-snapshot-20131119-rev205009-posix-sjlj-rt_v4\mingw64\lib\gcc\x86_64-w64-mingw32\4.9.0\include\c++\vector
    http://www.cplusplus.com/reference/vector/vector/operator%5B%5D/

     
  • Azumanga

    Azumanga - 2014-05-01

    This is not a bug. You do need to write std::vector<int>::size_type. The C++ standard does not have a global size_type, as the size_type can be different for different containers.

     

Log in to post a comment.