On 4/2/23 02:57, Joseph Reichman wrote:
You are attempting to insert a record using an rvalue-reference with an
initializer list. That's not supported by the XL C++ standard library
which does not support C++11. I already told you that two posts back.
The function prototype is like so:
template< class P >
std::pair<iterator, bool> insert( P&& value );
Check the dochttps://en.cppreference.com/w/cpp/container/map/insert
The Documentation in the above link is from CPP reference which it would seem
that the IBM XL C++ 2.4 compiler doesn’t support that level
These are the methods I see supported from XL C++ template library guide
pair<iterator, bool> insert(const value_type& x);
iterator insert(iterator it, const value_type& x);
template<class InIt>
void insert(InIt first, InIt last);
If It only can accommodate a rvalue that is it very limited in scope as you
can tell I am not C++ expert but an rvalue is only literal or a function that
would return the specified type
It can only accommodate an lvalue reference as rvalue references were
not introduced until C++11.
If XL C++ is into at C++ 11 at what level is it
I have lost count of how many times I have had to repeat myself. Let me
be clear, this is the final time. For XL C++ C++11 compatibility, please
refer to
https://www.ibm.com/docs/en/zos/2.3.0?topic=xcle-c11-compatibility. It
offers a limited subset of C++11, without support for features such as
lambdas and initializer lists. The standard library (formerly known as
the STL) is only compliant with C++98, meaning that there is no support
for rvalue-references or move semantics.
To the best of my knowledge, XL C/C++ has reached functional
stabilization. IBM uses xlclang/xlclang++ for its ports of Node.js,
Python, and other projects, and has stated that Open XL C/C++ is a
strategic priority.
Always select the appropriate tools for the task. You're using a
sledgehammer to crack a nut.
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN