Comment

Comment by andreidd

No, it can't. std::to_string isn't constexpr. And even if it was, it still wouldn't work because the std::string needs to be destroyed inside the constexpr context.

The article is also wrong because std::to_chars isn't constexpr so you can't use that.

parent andreidd 4 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton