|
From: Kelly Beard <kenverybigliar@xxxxxxxxx><c400-l@xxxxxxxxxxxx>
To: "Bare Metal Programming IBM i (AS/400 and iSeries)"
Date: 02/03/2017 12:41 PM()
Subject: Re: [C400-L] V7R3 C++ questions
Sent by: "C400-L" <c400-l-bounces@xxxxxxxxxxxx>
The reason why I'm asking is because the program below does not seem to
want to compile.
The documentation here says string::shrink_to_fit() is a C++11 routine.
http://www.cplusplus.com/reference/string/string/shrink_to_fit/
I wonder if we're missing an option or something like that in our
installation. This is a V7R3 box.
#include <iostream>
#include <string>
int main ()
{
std::string str (100,'x');
std::cout << "1. capacity of str: " << str.capacity() << '\n';
str.resize(10);
std::cout << "2. capacity of str: " << str.capacity() << '\n';
str.shrink_to_fit();
std::cout << "3. capacity of str: " << str.capacity() << '\n';
return 0;
}
This gives me "The compilation failed.". The listing says "shrink_to_fit
is not a member of class ...."wrote:
CRTBNDCPP PGM(BEAK/SHRINK) SRCSTMF('/home/beak/shrink_to_fit.cpp')
OUTPUT(*print) LANGLVL(*EXTENDED0X)
Is the compiler not fully C++11 compliant?
On Fri, Feb 3, 2017 at 12:09 PM, Justin Taylor <JUSTIN@xxxxxxxxxxxxx>
<c400-l@xxxxxxxxxxxx
My question was what compiler level I had, specifically looking for C++
11. I'm a "greenhorn" C++ dev, so maybe I missed it, but I don't see
anything in the 7.1 version of your link that answers that.
-----Original Message-----
From: Aaron Albertson [mailto:albertaa@xxxxxxxxxx]
Sent: Friday, February 03, 2017 11:19 AM
To: Bare Metal Programming IBM i (AS/400 and iSeries)
areSubject: Re: [C400-L] V7R3 C++ questions
Hi all,
The supported language extensions for the C and C++ compiler
Idocumented in the IBM i Knowledge Center. Here is a link to the v7r3
version of this documentation:
https://www.ibm.com/support/knowledgecenter/ssw_ibm_i_73/
rzarg/aix_cpp_extensions.htm
.
The compiler developers are adding new features every release.
werewas once a member of this team, and when I was part of the team there
(thethree primary criteria for what features were added:
Low hanging fruit (features which are trivial to support)
Features which the compiler team believes will be used by customers
priority)compiler team usually has to guess here)
Features requested by customers (these are given the highest
that
I believe this is still the general philosophy of the team. I know
sothe compiler team does have members that occasionally visit this forum,
willI would recommend posting details on exactly what you are missing. It
andhelp the compiler team bump that functionality up their priority list,
toit is also possible that you've discovered a bug in a feature that is
supposed to be working.
If there is a feature that you feel is particularly important I would
recommend submitting a request for enhancement (RFE) (or upvoting an
existing request if one already exists for the feature you would like
caresee). This is probably the best way to make sure that IBM knows you
articleabout a particular issue. Susan Gartner recently wrote a very nice
on The Four Hundred about how to submit an RFE:
https://www.itjungle.com/2017/01/30/guru-got-great-idea-tell-ibm/. The
article is focused on submitting a request for RPG, but to do the same
thing for C/C++ you just need to specify "Languages - Other" instead of
"Languages - RPG" for the component.
Thanks,
Aaron Albertson
--
This is the Bare Metal Programming IBM i (AS/400 and iSeries) (C400-L)
mailing list
To post a message email: C400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/c400-l
or email: C400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/c400-l.
--
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@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/c400-l
or email: C400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/c400-l.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.