What does “typename =” mean in the template parameters?

前端 未结 1 1271
-上瘾入骨i
-上瘾入骨i 2020-12-13 09:14

I have seen this expression in page 189 of the book \"Effective Modern C++\":

    template

        
相关标签:
1条回答
  • 2020-12-13 09:52

    That's an optional template parameter with no name and a default value.
    It's used to apply the enable_if condition; it will create a compiler error if the condition is not met.

    You can use exactly the same syntax for normal method arguments.

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