Fixes are available
APAR status
Closed as program error.
Error description
An invalid unexpected template error is output when processing template code that uses overloaded operator->. === TEST CASE === struct d1; struct Type { typedef d1 it; template<typename T> const T test() const; }; struct d2 { typedef struct Type Ref; typedef struct Type * Point; struct proxy { explicit proxy(Ref const & x) : m_ref(x) {} Ref* operator->() ; operator Ref*() ; Ref m_ref; }; typedef proxy result; static result apply(Ref const & x) { return result(x); } }; struct d1 { typedef d2 d2_; typedef d2_::result pointer; pointer operator->() const; }; int main(int argc, char **argv) { return Type::it()->test<int>(); } $ xlC test.cpp "test.cpp", line 34.32: 1540-0157 (S) The text ">" is unexpected. It may be that this token was intended as a template argument list terminator but the name is not known to be a template. $
Local fix
Problem summary
PROBLEM DESCRIPTION: Name lookup only found one operator-> but the return type also has its own overloaded operator-> . USERS AFFECTED: The problem is specific to overloaded operator-> , where lhs->rhs and lhs has non-pointer type and rhs is a template id.
Problem conclusion
The problem has been fixed.
Temporary fix
Comments
APAR Information
APAR number
IV85606
Reported component name
XL C/C++ FOR AI
Reported component ID
5725C7200
Reported release
D13
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt / Xsystem
Submitted date
2016-06-10
Closed date
2016-06-10
Last modified date
2016-06-10
APAR is sysrouted FROM one or more of the following:
APAR is sysrouted TO one or more of the following:
Fix information
Fixed component name
XL C/C++ FOR AI
Fixed component ID
5725C7200
Applicable component levels
RD13 PSN IV78684
UP06/09/13
[{"Line of Business":{"code":"LOB57","label":"Power"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SSGH3R","label":"XL C\/C++ for AIX"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"D13"}]
Document Information
Modified date:
07 September 2021