Unpacking parameter packs in template aliases

后端 未结 1 694
谎友^
谎友^ 2021-02-13 06:39

I run into a problem with unpacking variadic templates into a template alias.

The following code works with Clang 3.4 and GCC 4.8 but fails with GCC 4.9:



        
1条回答
  •  离开以前
    2021-02-13 06:59

    It was reported in gcc4.9 bugzilla:

    https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59498

    Minimal code to reproduce

    template 
    using alias = T;
    
    template 
    using variadic_alias = alias;
    
    using Fail = variadic_alias;
    
    int main() { }
    

    From the explanation from gcc folks - it is not so obvious this is a real bug. This is still discussion held in gcc bugzilla and in DR 1430 (http://open-std.org/jtc1/sc22/wg21/docs/cwg_active.html#1430) - summary in now in the question above.

    0 讨论(0)
提交回复
热议问题