aboutsummaryrefslogtreecommitdiffstats
path: root/attr/string.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'attr/string.hpp')
-rw-r--r--attr/string.hpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/attr/string.hpp b/attr/string.hpp
new file mode 100644
index 0000000..d7e1fcb
--- /dev/null
+++ b/attr/string.hpp
@@ -0,0 +1,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
+