We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 160fb8c commit 2670a82Copy full SHA for 2670a82
src/string19.lib/string19/StringStore.h
@@ -11,13 +11,13 @@ template<size_t N> using CharArray = char[N];
11
/// note: the stored array is always 0 terminated.
12
/// also note: N is the number of actual characters (not including the trailing \0)
13
template<size_t N> struct StringStore {
14
+ enum { count = N };
15
CharArray<N + 1> data{};
- static constexpr auto count = N;
16
17
constexpr char operator[](size_t i) const noexcept { return data[i]; }
18
};
19
20
/// note: always use storeLiteral("Hello") - or you get a 2nd \0 into your string!
21
-template<size_t N> StringStore(const char (&)[N]) -> StringStore<N>;
+template<size_t N> StringStore(const char (&)[N])->StringStore<N>;
22
23
} // namespace string19
0 commit comments