A fix is available
APAR status
Closed as program error.
Error description
A seemingly simple non-type template function/method in a template class is reported via error that it is not declared as a template. === TEST CASE === template <typename T> class C { public: template <T> void fn(); }; template <typename T> template <T> inline void C<T>::fn() { } int main() { C<int> c; c.fn<12>(); } $ xlC -c test.cpp "test.cpp", line 9.13: 1540-1174 (S) The member "template void fn()" is not declared as a template in its containing class definition. $
Local fix
Problem summary
PROBLEM DESCRIPTION: The compiler fails to reconcile the out-of-line definition to the correct declaration. Diagnostics or link errors are likely to occur. USERS AFFECTED: Out-of-line template member function definitions with a non-type template parameter of the type of an enclosing class template type parameter.
Problem conclusion
Fix applied to compiler reconciler. Recommend users apply fix if diagnostics or link error are encountered relating to the affected member functions.
Temporary fix
Comments
APAR Information
APAR number
IJ12236
Reported component name
XL C/C++ FOR AI
Reported component ID
5725C7200
Reported release
D10
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt / Xsystem
Submitted date
2018-12-21
Closed date
2018-12-21
Last modified date
2018-12-21
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
RD10 PSY
UP
[{"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":"13.1"}]
Document Information
Modified date:
15 September 2021