Determine `constexpr` execution - during compilation or at runtime?

后端 未结 2 2062
故里飘歌
故里飘歌 2021-02-04 05:31

Is there a way to achieve different behaviour of a constexpr function in the compilation phase and at runtime?

Consider the following example (using a theor

2条回答
  •  渐次进展
    2021-02-04 05:38

    No, there is no such way.

    Sorry.

    N3583 is a paper proposing changes to allow what you are asking for.

提交回复
热议问题