|
From: Ehsan A. <aza...@gm...> - 2010-12-28 01:59:29
|
On Mon, Dec 27, 2010 at 12:15 PM, K. Frank <kfr...@gm...> wrote:
> Hello List!
>
> I have a question about a specific bit of c++0x support.
>
> I would like to use an initializer list to initialize a vector-of-vector-of-pair
> (sample code below). Is there a version of mingw available that supports
> this?
>
> This works on a mingw-w64 build of g++ 4.5.2, and fails on a recent
> mingw32 build of g++ version 4.5.0. (It also fails on a tdm2-mingw32
> build of g++ version 4.4.1.)
>
> Code (init_vvp.cpp):
>
> // g++ -std=c++0x -c init_vvp.cpp
> #include <vector>
> #include <utility>
> using std::vector;
> using std::pair;
> vector<vector<int>> vv = { {1,2,3}, {4,5,6}, {7,8,9} };
> vector<pair<vector<int>,vector<int>>> vpv = { {{1,2,3},{-1,-2,-3}},
> {{4,5,6},{-4,-5,-6}}, {{7,8,9},{-7-8-9}} };
> vector<vector<pair<int,int>>> vvp = { {{1,-1},{2,-2},{3,-3}},
> {{4,-4},{5,-5},{6,-6}}, {{7,-7},{8,-8},{9,-9}} };
>
>
> The mingw32 4.5.0 compiler gives an error on the last line (line 8):
>
> init_vvp.cpp:8:110: error: no matching function for call to
> 'std::vector<std::vector<std::pair<int, int> >
>>::vector(<brace-enclosed initializer list>)'
>
> That is, the initializer list fails for vector-of-vector-of-pair, but works for
> vector-of-vector and vector-of-pair-of-vector. (For what it's worth, none
> of the nested initializer lists are accepted by the Comeau online compiler.)
>
>
> A couple of points and questions:
>
> 1) I believe that this is legal c++0x syntax, but correct me if I'm wrong.
>
> 2) I'm assuming that this is a g++ version issue (4.5.0 vs. 4.5.2), rather
> than a mingw32 vs. mingw-w64 issue. True?
>
> 3) I haven't found any discussion of this as a known g++ c++0x bug.
>
>
> Anyway, to reiterate my main question: Is there a (32-bit) version of
> mingw available that supports this particular construct?
>
quoting from:
http://sourceforge.net/apps/trac/mingw-w64/wiki/download%20filename%20structure
have you tried mingw-w32-bin_i686-linux or mingw-w32-bin_i686-mingw
> Thanks.
>
>
> K. Frank
>
> ------------------------------------------------------------------------------
> Learn how Oracle Real Application Clusters (RAC) One Node allows customers
> to consolidate database storage, standardize their database environment, and,
> should the need arise, upgrade to a full multi-node Oracle RAC database
> without downtime or disruption
> http://p.sf.net/sfu/oracle-sfdevnl
> _______________________________________________
> MinGW-users mailing list
> Min...@li...
>
> This list observes the Etiquette found at
> http://www.mingw.org/Mailing_Lists.
> We ask that you be polite and do the same. Disregard for the list etiquette may cause your account to be moderated.
>
> _______________________________________________
> You may change your MinGW Account Options or unsubscribe at:
> https://lists.sourceforge.net/lists/listinfo/mingw-users
> Also: mailto:min...@li...?subject=unsubscribe
>
|