How is P0522R0 breaking code?

后端 未结 2 412
一生所求
一生所求 2020-12-01 23:53

Today I was reading the C++17 support page of clang. I\'ve notice something odd. The feature Matching template template parameters to compatible arguments (P0522R0)

2条回答
  •  生来不讨喜
    2020-12-02 00:11

    A more common scenario is when some code wants to inspect the template arguments with a set of partial specializations, e.g.:

    template struct Foo;
    
    template class X, class T> 
    struct Foo> { /* ... */ };
    
    template class X, class T, class U> 
    struct Foo> { /* ... */ };
    
    // etc., etc.
    

    Foo> is now ill-formed without an appropriate partial ordering fix.

提交回复
热议问题