IBM Support

IV81794: ERROR WITH STATIC CONST USED AS TEMPLATE PARAMETER FOR CONST REFERENCE

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • Instantiation of a specialized template using a 'static const'
    variable is causing the compiler to output an invalid error when
    expecting a 'const' variable.
    
    
       === TEST CASE ==
    
    struct A { static const int val; };
    
    template <const int &T>
    struct B { };
    
    B<A::val> tmp;
    
    
    $ xlC test.cpp
    "test.cpp", line 6.3: 1540-1266 (S) A template argument with
    type "const int" cannot be converted to a template parameter
    with type "const int &".
    $
    

Local fix

  • N/A
    

Problem summary

  • PROBLEM DESCRIPTION:
    Diagnostic checking of arguments for the non-type template
    parameter of reference type was incorrect.
    
    USERS AFFECTED:
    The problem is specific to non-type template parameter of
    reference type.
    

Problem conclusion

  • The problem has been resolved.
    

Temporary fix

Comments

APAR Information

  • APAR number

    IV81794

  • 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

    2016-02-24

  • Closed date

    2016-02-24

  • Last modified date

    2016-02-24

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

    IV79439

  • 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

[{"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","Line of Business":{"code":"LOB57","label":"Power"}}]

Document Information

Modified date:
01 October 2021