Alias template specialisation

后端 未结 4 1425

Can alias templates (14.5.7) be explicitly specialised (14.7.3)?

My standard-fu fails me, and I can\'t find a compiler to test on.

The text \"when a template

4条回答
  •  刺人心
    刺人心 (楼主)
    2020-11-27 18:09

    Bjarne says:

    Specialization works (you can alias a set of specializations but you cannot specialize an alias)

    And, whilst not an explicit rule, "alias templates" are missing from the following list at 14.7.3/1:

    An explicit specialization of any of the following:

    • function template
    • class template
    • member function of a class template
    • static data member of a class template
    • member class of a class template
    • member class template of a class or class template
    • member function template of a class or class template

    can be declared[...]

    I think that this is the best guarantee you'll get.

提交回复
热议问题