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]

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.


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