You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
370 B
C++
25 lines
370 B
C++
#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
|
|
|