C++0x, V7R3, ixlc

Kelly Beard <[email protected]>
Newsgroups gmane.comp.lang.as400.c
Message-ID <CAOvM2St-bimqrgLX7menOTG+6G1qscYEZcMyTX_sQas4pHWCmQ@mail.gmail.com>
Trying out some stuff on V7R3 and ixlc.  Notice that I am coding a double
vector thusly:

vector<vector<int>> v2;

Under an older compiler, you'll get barked at for not spacing ">>" like ">
>".  I compiled with :
ixlc -+ -oBEAK/XXX -qlanglvl=extended0x -qstdlogmsg -qprint yourmom.cpp

I simply get "Compilation failed."  (Shouldn't I be getting compiler
messages to the screen with "-qstdlogmsg"?)

In any case, the helpful joblog says:
SUGGESTION: Try using "-qlanglvl=rightanglebracket". It looks like you are
trying to use the associated C++0x
feature.


So, I try
ixlc -+ -oBEAK/XXX -qlanglvl=extended0x -qstdlogmsg -qprint
-qlanglvl=rightanglebracket yourmom.cpp

then get
INVALID COMPILING OPTIONS:-qlanglvl=rightanglebracket

:-(

#include <iostream>
#include <string>
#include <sstream>
#include <iomanip>
#include <vector>
#include <unistd.h>

using namespace std;


class yourmom {
public :
    operator string() const {
        return "your mom";
    }
};


int main(int argc, char* argv[])
{
    yourmom c;
    int i = 666;
    auto x = i;
    vector<int> v;
    vector<vector<int>> v2;

    v.push_back(111);
    v.push_back(222);
    v.push_back(333);
    v.push_back(444);

    string s = c;
    cout << s << endl;
    cout << "i=" << i << endl;
    cout << "x=" << x << endl;
    cout << "i + x=" << i + x << endl;
    for (int i : v) {
        cout << i << endl;
    }
}


-- 
Kelly Beard
-- 
This is the Bare Metal Programming IBM i (AS/400 and iSeries) (C400-L) mailing list
To post a message email: C400-L-Zwy7GipZuJhWk0Htik3J/[email protected]
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/c400-l
or email: C400-L-request-Zwy7GipZuJhWk0Htik3J/[email protected]
Before posting, please take a moment to review the archives
at http://archive.midrange.com/c400-l.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.