File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -342,7 +342,7 @@ struct contains_algo;
342342template <typename T>
343343struct contains_algo <T, true > {
344344 template <class Container , typename key_type>
345- static bool run (Container &container, key_type const &key) {
345+ static bool run (const Container &container, key_type const &key) {
346346 return std::find (container.begin (), container.end (), key) !=
347347 container.end ();
348348 }
@@ -351,7 +351,7 @@ struct contains_algo<T, true> {
351351template <typename T>
352352struct contains_algo <T, false > {
353353 template <class Container , typename key_type>
354- static bool run (Container &container, key_type const &key) {
354+ static bool run (const Container &container, key_type const &key) {
355355 for (size_t k = 0 ; k < container.size (); ++k) {
356356 if (&container[k] == &key) return true ;
357357 }
You can’t perform that action at this time.
0 commit comments