-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Description
Is there a specific reason to not constexpr
ify Dragonbox? If not, I believe it should be not terribly difficult to do so, because as far as I know the only real obstacle is that some intrinsics are not constexpr
. But we can just wrap those intrinsics with if (!is_constant_evaluated())
and provide fallback implementations along with that. I'm experimenting myself with the recent master branch, and I guess Dragonbox is fine while it fails at this line, I do not know why.
Another issue is that the compiler is whining about static constexpr
tables inside constexpr
functions being static
. (See e.g., https://stackoverflow.com/questions/62458079/static-constexpr-variables-in-a-constexpr-function.) Honestly I think this is a sort of nonsensical language restriction, but well, it is like that. A simple solution is to move those tables out of the functions.