Fixes are available
November 2009 PTF for XL C/C++ for AIX, V10.1
October 2010 PTF for XL C/C++ for AIX, V10.1
May 2012 PTF for XL C/C++ for AIX, V10.1
January 2013 PTF for XL C/C++ for AIX, V10.1
XL C/C++ for AIX Fix Pack 18 (July 2013 PTF) for 10.1
XL C/C++ for AIX Fix Pack 19 (October 2013 PTF) for 10.1
XL C/C++ for AIX Fix Pack 21 (October 2015 PTF) for 10.1
August 2009 PTF for XL C/C++ for AIX, V10.1
March 2010 PTF for XL C/C++ for AIX, V10.1
April 2010 PTF for XL C/C++ for AIX, V10.1
June 2010 PTF for XL C/C++ for AIX, V10.1
May 2011 PTF for XL C/C++ for AIX, V10.1
October 2011 PTF for XL C/C++ for AIX, V10.1
February 2012 PTF for XL C/C++ for AIX, V10.1
September 2012 PTF for XL C/C++ for AIX, V10.1
XL C/C++ for AIX Fix Pack 20 (October 2014 PTF) for 10.1
APAR status
Closed as program error.
Error description
The compiler is failing to complete a name lookup in some template classes that depend on inheritance relationships in the template parameters, which are also template classes. Example: $ cat small2.cxx template <class ZZ, class ZZout=ZZ> struct ZBoss { }; template<template<class> class V, class T> struct Doer : T { }; struct NoBoss { template<class Z> struct P{ }; }; template <typename A> struct Va { }; template<class ZZ, class V = NoBoss> struct TheGuy { // (S) 1540-0716 Doer<V::template P, ZBoss<ZZ> > vp0; Va<int> stuff; }; // (S) 1540-0138 template class TheGuy<int,NoBoss>; $ xlC -c small2.cxx "small2.cxx", line 17.8: 1540-0716 (S) The template argument "V::P<>" does not match the template parameter "template class V". "small2.cxx", line 22.16: 1540-0138 (S) The undefined template "TheGuy" must not be explicitly instantiated. $
Local fix
Provide an explicit instantiation of the template base class in question. Example: $ cat wa2.cxx template <class ZZ, class ZZout=ZZ> struct ZBoss { }; template<template<class> class V, class T> struct Doer : T { }; struct NoBoss { template<class Z> struct P{ }; }; template <typename A> struct Va { }; template struct Va<int>; // explicit instantiation template<class ZZ, class V = NoBoss> struct TheGuy { Doer<V::template P, ZBoss<ZZ> > vp0; Va<int> stuff; }; template class TheGuy<int,NoBoss>; $ xlC -c wa2.cxx $
Problem summary
USER AFFECTED: The problem appears when a template qualified name is specified without arguments in order to match a template template parameter. PROBLEMDESCRIPTION: A problem with name lookup was causing this name to be incorrectly resolved resulting in an error in matching the template template parameter.
Problem conclusion
The name lookup issue has been resolved.
Temporary fix
Comments
APAR Information
APAR number
IZ56493
Reported component name
XL C++ AIX
Reported component ID
5724U8100
Reported release
A10
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt
Submitted date
2009-07-31
Closed date
2009-07-31
Last modified date
2009-08-27
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++ AIX
Fixed component ID
5724U8100
Applicable component levels
Document Information
Modified date:
04 October 2021