IBM Support

IZ40765: TEMPLATE OMISSION PROBLEM

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • xlC is not appropriately omiting trailing template arguments as
    detailed in C++, ISO/IEC 14882:2003, 14.8.1 Explicit template
    argument specification.
    
    ================================================================
    
    struct FF
    {
        typedef double result_type;
    };
    
    struct target;
    
    void doreply( target*, double&);
    
    template<class F, class T>
    void send_request(void (*reply)(T* t, typename F::result_type&
    r));
    
    void foo()
    {
        send_request<FF>(&doreply);
    }
    

Local fix

  • If all the template parameters are explicitly specified, the
    compiler will not go into argument deduction.
    ===============================================================
    Explicitely provide the template arguments:
    
    send_request<FF, target, memo>(arg,&doreply,m);
    

Problem summary

  • The problem appears during argument deduction when a template
    parameter is in a non-deduced context.
    
    The compiler was attempting to deduce a parameter from a
    non-deduced context instead of using the explicitly specified
    argument
    

Problem conclusion

  • Argument deduction now skips the non-deduced context and uses
    the explicit argument
    

Temporary fix

Comments

APAR Information

  • APAR number

    IZ40765

  • Reported component name

    XLC C++ AIX

  • Reported component ID

    5724S7100

  • Reported release

    900

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2009-01-02

  • Closed date

    2009-01-02

  • Last modified date

    2009-01-27

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

    IZ35151

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

Fix information

  • Fixed component name

    XLC C++ AIX

  • Fixed component ID

    5724S7100

Applicable component levels

[{"Line of Business":{"code":"LOB08","label":"Cognitive Systems"},"Business Unit":{"code":"BU054","label":"Systems w\/TPS"},"Product":{"code":"SSJT9L","label":"XL C\/C++"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"9.0"}]

Document Information

Modified date:
04 October 2021