Skip to content

Commit a10be3f

Browse files
committed
Avoid copy on equality operator in fixed_string
1 parent f2c1232 commit a10be3f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/libhat/fixed_string.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ namespace hat {
136136
return std::equal(this->begin(), this->end(), str.begin(), str.end());
137137
}
138138

139-
constexpr bool operator==(std::basic_string<Char> str) const {
139+
constexpr bool operator==(const std::basic_string<Char>& str) const {
140140
return std::equal(this->begin(), this->end(), str.begin(), str.end());
141141
}
142142

0 commit comments

Comments
 (0)