How to generate a constexpr version string from three integers (or perhaps a git/SVN commit/rev. string)?
问题 Say I have constexpr const std::uint8_t major = 1; constexpr const std::uint8_t minor = 10; constexpr const std::uint8_t bugfix = 0; and I want constexpr const char* version_string(){ ... } to return the equivalent of "1.10.0" in this example, how would I do it? I assume I'll need both of these, in constexpr : integer to string conversion string concatenation The problem is purely academic, and I see little to no use to actually have it constexpr other than "it's possible". I just can't see