constexpr: errors with floating point representation?

后端 未结 1 1551
故里飘歌
故里飘歌 2021-01-17 20:00

I was hoping to convert a constant from degrees to radians (at compile time), so I opted to use a constexpr. However, my program would not compile and so I tried to debug th

相关标签:
1条回答
  • 2021-01-17 20:55

    It's because you specified -frounding-math. You told the compiler you might change rounding mode at runtime, so it can't round at compile time. Did you really mean to?

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