samedi 19 janvier 2019

C++ Force non constexpr context

I have functions that are declared withe the constexpr specifier and i have already tested that they are be evaluated at compile time in unit tests.

Now I want to use sanitizers with my unit test to find even more problems. But because so much of my functions are specified with constexpr I'm not sure how to do it because if a function is evaluated at compile time the sanitizers are useless or not?

Is there some way to force a constexpr function to be not evaluated a compile time. Or do you have some other recommendations.

Aucun commentaire:

Enregistrer un commentaire