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
When compiling the following test case, the compiler claims the two constructors are the same and issues a duplicate definition error. Error Message: $ xlC -c test.cpp "test.cpp", line 16.9: 1540-0401 (S) The member "TypeBase<std::string,TYPE>::TypeBase<std::string,TYPE>(const TypeBase &)" is already declared. "test.cpp", line 14.18: 1540-0425 (I) "TypeBase<std::string,TYPE>" is defined on line 14 of "test.cpp". ======= TEST CASE ======= #include <string> template <typename BUILTIN, typename TYPE> class TypeBase { explicit TypeBase (const BUILTIN & value) { } TypeBase (const TypeBase & value) { } }; template <typename TYPE> class TypeBase<std::string, TYPE> { explicit TypeBase (const std::string & value) { } TypeBase (const TypeBase & value) { } }; class MyType : public TypeBase<std::string, MyType> { };
Local fix
N/A
Problem summary
This problem may appear when a partial specialization has a copy constructor and at least one other constructor. The compiler claims the 2 constructors are the same and issues a duplicate definition error.
Problem conclusion
The problem was the result of a logic error in a query looking for injected class names in a partial specialization, this has been resolved.
Temporary fix
Comments
APAR Information
APAR number
IZ56121
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-27
Closed date
2009-08-10
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:
27 August 2009