C++ template argument with expression

后端 未结 1 1458
遥遥无期
遥遥无期 2021-02-14 18:43

I am having trouble with C++. I want to be able to put an expression inside a template as an argument. Here is my code:

#include 
using names         


        
1条回答
  •  爱一瞬间的悲伤
    2021-02-14 19:42

    Use std::conditional:

    #include  
    std::vector 0), float, int>::type> abc() {}
    

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