vector instantiation

Alex Vinokur alexvn@connect.to
Sat Apr 19 08:44:00 GMT 2003


"Andrey R. Urazov" <coola@ngs.ru> wrote in message news:1050685291.981.5.camel@r-a117-bur...
Hello,

> Concerning the problem of instantiation of STL vector with the template
> parameter size of array. Sorry, but I forgot to include the program code
> in my posting. Here it is:
>
> #include <vector>
>
> using namespace std;
>
> int main()
> {
>     vector<size_t[4]> v(10);
      vector<char> v1(10), v2(20);
      vector<int>  v3(10), v4(20), v3 (123);
>
>     return 0;
> }
>
>
>
>
> And compiling this with gcc-3.2.2 I get:
>
> /usr/include/c++/3.2/bits/stl_vector.h: Dans constructor «
> std::vector<_Tp,
>    _Alloc>::vector(unsigned int) [with _Tp = size_t[4], _Alloc =
>    std::allocator<size_t[4]>] »:
> test.cpp:7:   instancié à partir d'ici
> /usr/include/c++/3.2/bits/stl_vector.h:342: ISO C++ interdit le
> transtypage
>    vers un type tableau « size_t[4] »
>
>
> P.S. Just in case, please CC me since I'm not on the mailing list. Thank
> you.
>
> 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