Fixes are available
APAR status
Closed as program error.
Error description
A template default parameter is not found by the compiler. The default parameter is dependant on the first template type in the template parameter list, which is itself a typedef. === TEST CASE === template <class LIST, int NUMBER = LIST::LENGTH> struct TypeListTypeOf { typedef int Type; }; template <typename A1> struct TypeList { enum { LENGTH = 1 }; }; typedef TypeList<double> List; template <typename ARG> struct OffsetOf { typedef TypeListTypeOf<List>::Type Type; // 'List'is a TypeList, containing the LENGTH declaration }; int main() { OffsetOf<int>::Type foo = 0; (void) foo; } $ xlC -c apar.cpp "apar.cpp", line 2.24: 1540-0130 (S) "LENGTH" is not declared. $
Local fix
Problem summary
PROBLEM DESCRIPTION: An incorrect instantiation point causes the compiler to miss an implicit instantiation required to compile resulting in an error for an invalid use of an incomplete class. USERS AFFECTED: The problem happens with the use of a default template parameter in a template class.
Problem conclusion
The problem has been resolved.
Temporary fix
Comments
APAR Information
APAR number
IV99406
Reported component name
XL C/C++ FOR AI
Reported component ID
5725C7200
Reported release
C10
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt / Xsystem
Submitted date
2017-08-30
Closed date
2018-04-23
Last modified date
2018-04-23
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
RC10 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":"12.1"}]
Document Information
Modified date:
02 October 2021