Is substitution performed on a variadic parameter pack type if the pack is empty?

前端 未结 1 1036
自闭症患者
自闭症患者 2020-12-03 18:27

Consider the following program:

#include 

enum class dummy {};
template 
using EnableIf = typename std::enable_if

        
1条回答
  •  有刺的猬
    2020-12-03 18:57

    I believe I have found the relevant piece of standardese. §14.8.2p7 says:

    The substitution occurs in all types and expressions that are used in the function type and in template parameter declarations.

    Since EnableIf> is used in a template parameter declaration, substitution should occur and this is a bug in clang.

    0 讨论(0)
提交回复
热议问题