Hi All! Ehsan's suggestion to try mingw-w32-bin_i686-mingw did the trick. (See below.)
On Mon, Dec 27, 2010 at 10:11 PM, K. Frank <[email protected]> wrote: > Hello Ehsan! > > (Cross-posted, as of this reply, to mingw64.) > > On Mon, Dec 27, 2010 at 8:59 PM, Ehsan Azarnasab <[email protected]> wrote: >> On Mon, Dec 27, 2010 at 12:15 PM, K. Frank <[email protected]> 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>)' >>> ... > >> 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 > > No I haven't tried a 32-bit-target compiler from the mingw-w64 project. > > That's a good point. Assuming (as I suspect) that the initializer-list > issue is a g++ version issue (i.e., fixed in g++ 4.5.2), then maybe I > can get a 4.5.2 version targeting win32 from the mingw-w64 project. > > Would any one know which if any) of the 32-bit-targeting mingw-w64 > builds are version 4.5.2 (or later)? > > Thanks -- I'll continue to look into this suggestion. I downloaded mingw-w32-bin_i686-mingw_20101002_4.5_sezero.zip (from http://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win32/Personal%20Builds/sezero_4.5_20101002/) It is indeed g++ version 4.5.2 (--version reports "g++ (GCC) 4.5.2 20101002 (prerelease) [svn/rev.164902 - mingw-w64/oz]".), and produces 32-bit code. The sample code compiles fine (just like it did with the 64-bit 4.5.2 g++ (mingw-w64-bin_x86_64-mingw_20101002_4.5_sezero.zip). (It seems to me that this was most likely a bug in c++0x support that has been fixed as of 4.5.2.) Thanks for the advice. And thanks to Ozkan Sezer for his builds. 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-w64-public mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
