Is it possible to define an alias for a template-template parameter?

后端 未结 2 445
臣服心动
臣服心动 2021-01-24 12:19

I\'m experimenting with template-template for fun. I have the following class:

template class T, typename R> class Unit
{    
    usi         


        
2条回答
  •  [愿得一人]
    2021-01-24 12:55

    You cannot make an alias for T. The following was discussed in the committee to make an alias for T (because a very late C++11 draft contained notes that stated that it is an alias for T which a Defect Report cleaned up).

    // Courtesy of @KerrekSB
    template