Hi,
I am trying to use a class member that uses nested vectors of depth 3:
vector< vector< vector > > classVariable_;
However, I then get compiler warnings throughout my code when I try do something as simple as classVariable_.clear():
/usr/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/bits/stl_vector.h: In member function `std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(const std::vector<_Tp, _Alloc>&) [with _Tp = std::vector >, _Alloc = std::allocator > >]': /usr/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/bits/stl_vector.h:715: warning: '__result' might be used uninitialized in this function /usr/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/bits/stl_uninitialized.h:82: warning: '__cur' might be used uninitialized in this function /usr/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/bits/stl_uninitialized.h:82: warning: '__cur' might be used uninitialized in this function
The strange thing is that this works with nested vectors of depth 2, but not of depth 3 or more. Is this something to do with missing default operators/constructors in the stl libraries?
Does anyone know a clean solution around this? I am compiling this using cygwin but that should not have an effect on this.
Thank you.