IV50473: TEMPLATE IS ALREADY DEFINED ERROR

Subscribe

You can track all active APARs for this component.

APAR status

  • Closed as program error.

Error description

  • In the September 2013 PTF for XL C/C++ for AIX, V12.1
    (12.1.0.5), a program with the following definitions may
    encounter compilation error.
    
    template <size_t SIZE>
    inline bsl::ostream& operator<<(bsl::ostream& os, const
    LevelPrinter<const char[SIZE]>& lp)
    {...}
    
    template <size_t SIZE>
    inline bsl::ostream& operator<<(bsl::ostream& os, const
    LevelPrinter<char[SIZE]>& lp)
    {...}
    
    
    xlC -c test.cpp
    "test.cpp", line 50323.22: 1540-0403 (S) "template <size_t
    SIZE> TEST::operator<<(bsl::ostream &, const LevelPrinter<char
    [SIZE]> &)" is already defined.
    "test.cpp", line 50315.22: 1540-0425 (I) "operator<<" is
    defined on line 50315 of "test.cpp".
    

Local fix

  • N/A
    

Problem summary

  • PROBLEM DESCRIPTION: template functions collide when argument
    an array of const vs non-const causing a compile error
    indicating the template function was already defined
    
    USERS AFFECTED: Programs with a template argument that is an
    array when one function is an array of const and one is not
    

Problem conclusion

  • The problem is fixed.
    

Temporary fix

Comments

APAR Information

  • APAR number

    IV50473

  • 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

  • Submitted date

    2013-10-07

  • Closed date

    2013-12-13

  • Last modified date

    2013-12-13

  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

    LI77868

Fix information

  • Fixed component name

    XL C/C++ FOR AI

  • Fixed component ID

    5725C7200

Applicable component levels

  • RC10 PSY U863925

       UP C



Rate this page:

(0 users)Average rating

Add comments

Document information


More support for:

XL C/C++ for AIX
Compiler

Software version:

12.1

Reference #:

IV50473

Modified date:

2013-12-13

Translate my page

Machine Translation

Content navigation