This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: vector instantiation
- From: "Alex Vinokur" <alexvn at connect dot to>
- To: gcc-help at gcc dot gnu dot org
- Date: Thu, 17 Apr 2003 14:55:24 +0200
- Subject: Re: vector instantiation
- References: <1050558071.1020.15.camel@r-a117-bur>
"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
=================================