@@ -38,8 +38,8 @@ BOOST_HANA_NAMESPACE_BEGIN
38
38
// ! The representation of `hana::string` is implementation-defined.
39
39
// ! In particular, one should not take for granted that the template
40
40
// ! parameters are `char`s. The proper way to access the contents of
41
- // ! a `hana::string` as character constants is to use `hana::unpack`
42
- // ! or `hana::to<char const*>`, as documented below.
41
+ // ! a `hana::string` as character constants is to use `hana::unpack`,
42
+ // ! `.c_str()` or `hana::to<char const*>`, as documented below.
43
43
// !
44
44
// !
45
45
// ! Modeled concepts
@@ -57,23 +57,28 @@ BOOST_HANA_NAMESPACE_BEGIN
57
57
// ! lexicographical comparison of strings.
58
58
// ! @include example/string/orderable.cpp
59
59
// !
60
- // ! 3. `Foldable`\n
60
+ // ! 3. `Monoid`\n
61
+ // ! Strings form a monoid under concatenation, with the neutral element
62
+ // ! being the empty string.
63
+ // ! @include example/string/monoid.cpp
64
+ // !
65
+ // ! 4. `Foldable`\n
61
66
// ! Folding a string is equivalent to folding the sequence of its
62
67
// ! characters.
63
68
// ! @include example/string/foldable.cpp
64
69
// !
65
- // ! 4 . `Iterable`\n
70
+ // ! 5 . `Iterable`\n
66
71
// ! Iterating over a string is equivalent to iterating over the sequence
67
72
// ! of its characters. Also note that `operator[]` can be used instead of
68
73
// ! the `at` function.
69
74
// ! @include example/string/iterable.cpp
70
75
// !
71
- // ! 5 . `Searchable`\n
76
+ // ! 6 . `Searchable`\n
72
77
// ! Searching through a string is equivalent to searching through the
73
78
// ! sequence of its characters.
74
79
// ! @include example/string/searchable.cpp
75
80
// !
76
- // ! 6 . `Hashable`\n
81
+ // ! 7 . `Hashable`\n
77
82
// ! The hash of a compile-time string is a type uniquely representing
78
83
// ! that string.
79
84
// ! @include example/string/hashable.cpp
@@ -125,6 +130,10 @@ BOOST_HANA_NAMESPACE_BEGIN
125
130
template <typename X, typename Y>
126
131
friend constexpr auto operator >=(X&& x, Y&& y);
127
132
133
+ // ! Performs concatenation; equivalent to `hana::plus`
134
+ template <typename X, typename Y>
135
+ friend constexpr auto operator +(X&& x, Y&& y);
136
+
128
137
// ! Equivalent to `hana::at`
129
138
template <typename N>
130
139
constexpr decltype (auto ) operator[](N&& n);
0 commit comments