diff options
author | lloyd <[email protected]> | 2011-06-17 16:54:16 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2011-06-17 16:54:16 +0000 |
commit | f799e57c35ff53136b0bbb7a40d44d7716db88a9 (patch) | |
tree | 4166a9694c990d667723088fcfe3fe63fef1dfd7 /src/utils/stl_util.h | |
parent | 98fc1399dd3e61784a08c7da76ab729be6a93aff (diff) |
Add string_join; inverse of split_on.
Use auto in a few more places. Use GCC 4.6's range-for
Delete rather than hide Algorithm copy constructor/assignment
Move version to more or less randomly chosen 1.99 so there is no
ambiguity about versions.
Diffstat (limited to 'src/utils/stl_util.h')
-rw-r--r-- | src/utils/stl_util.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/utils/stl_util.h b/src/utils/stl_util.h index 0eb078244..6e85839a5 100644 --- a/src/utils/stl_util.h +++ b/src/utils/stl_util.h @@ -24,7 +24,7 @@ inline V search_map(const std::map<K, V>& mapping, const K& key, const V& null_result = V()) { - typename std::map<K, V>::const_iterator i = mapping.find(key); + auto i = mapping.find(key); if(i == mapping.end()) return null_result; return i->second; @@ -34,7 +34,7 @@ template<typename K, typename V, typename R> inline R search_map(const std::map<K, V>& mapping, const K& key, const R& null_result, const R& found_result) { - typename std::map<K, V>::const_iterator i = mapping.find(key); + auto i = mapping.find(key); if(i == mapping.end()) return null_result; return found_result; |