This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
vector instantiation
- From: "Andrey R. Urazov" <coola at ngs dot ru>
- To: gcc-help at gnu dot org
- Date: 17 Apr 2003 10:41:11 +0500
- Subject: vector instantiation
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]'
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.