1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
#ifndef MBUOY_ATTR_STRING_HPP #define MBUOY_ATTR_STRING_HPP namespace mbuoy { template<int N> struct string { consteval string(const char (&s_)[N]) { for (int i = 0; i < N; ++i) s[i] = s_[i]; } consteval operator const char *() const { return s; } char s[N]; }; } // namespace mbuoy #endif // MBUOY_ATTR_STRING_HPP