Is it required to explicitly list default parameters when using template template parameter?

前端 未结 2 903
余生分开走
余生分开走 2020-12-11 00:16

I\'d like to ask whether the following code sample should compile:

#include 
#include 
#include 

using namespa         


        
2条回答
  •  臣服心动
    2020-12-11 01:09

    A (seemingly related) quote from the standard 14.1 Template parameters

    14 . A template-parameter of a template template-parameter is permitted to have a default template-argument. When such default arguments are specified, they apply to the template template-parameter in the scope of the template template-parameter.

    [ Example:

    template  struct B {};
    
    template