3 ms·
Post-C++11 you can work with strings at compile-time using constexpr template functions. IIRC you need something along the lines of this: > template <size_t N>
by swift 13y ago
Post-C++11 you can work with strings at compile-time using constexpr template functions. IIRC you need something along the lines of this:
> template <size_t N> constexpr foo(const char str[N]) { ... }
The fact that constexpr strings can't be template parameters boggles the mind.