For example I have a constexpr function, but I use a runtime variable (not marked as constexpr
) to take the return value. In this case, I'm not sure whether the function runs on compile time or runtime, So is there any way to debug?
At first I thinked about static_assert
, but it looks like static_assert
cannot do this. Then I thought convert the code to assembly code, but it is way too difficult to check the assembly code to figure out.
Aucun commentaire:
Enregistrer un commentaire