vector instantiation

Alex Vinokur alexvn@connect.to
Thu Apr 17 11:55:00 GMT 2003


"Andrey R. Urazov" <coola@ngs.ru> wrote in message news:1050558071.1020.15.camel@r-a117-bur...
> Hello,
>
> I tried to declare vector with the template parameter of array and,
> unfortunately, the compilation failed with the following error message
> (I'm using gcc-3.2.2):
>
> /usr/include/c++/3.2/bits/stl_vector.h: In constructor `std::vector<_Tp,
>    _Alloc>::vector(unsigned int) [with _Tp = size_t[4], _Alloc =
>    std::allocator<size_t[4]>]':
> test.cpp:7:   instantiated from here
> /usr/include/c++/3.2/bits/stl_vector.h:342: ISO C++ forbids casting to
> an array
>    type `size_t[4]'
>

Could you send your code to news:gmane.comp.gcc.help ?

> I think this is incorrect behavior. But, of course, I may be wrong. Any
> ideas? Is permitted to declare STL containers with the elements of
> arrays in the C++ standard?
>
> Best regards,
> Andrey Urazov.
>
>

   =================================
   Alex Vinokur
     mailto:alexvn@connect.to
     http://www.simtel.net/pub/oth/19088.html
   =================================





More information about the Gcc-help mailing list