This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: vector instantiation


"Andrey R. Urazov" <coola at ngs dot ru> wrote in message news:1050558071 dot 1020 dot 15 dot camel at r-a117-bur dot  dot  dot 
> 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 at connect dot to
     http://www.simtel.net/pub/oth/19088.html
   =================================




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]