Constexpr variable and division

前端 未结 2 1746
不知归路
不知归路 2021-01-22 16:07

I\'m trying to evaluate this simple expression at compile time using C++11 new constexpr feature:

template 
class Test
{
   static constexpr          


        
2条回答
  •  执念已碎
    2021-01-22 16:56

    Solved. One of the template instance had b=0. Somehow, Clang didn't warn me I was dividing by zero. And +Inf is not a constant expression.

提交回复
热议问题