Explicitly use defaults for some parameters in class template instantiation

后端 未结 4 1765
囚心锁ツ
囚心锁ツ 2021-02-18 14:42

A class template can have multiple parameters that all have defaults.

template

        
4条回答
  •  南方客
    南方客 (楼主)
    2021-02-18 15:09

    If all your template arguments have defaults like in your example, you could create a helper struct to extract them for you.

    template 
    struct default_for_helper;
    
    template