Commit 7318bee3 authored by gejun's avatar gejun

move all functions in stl_utils.h into namespace butil

parent 3becc728
......@@ -15,6 +15,8 @@
#include "butil/logging.h"
namespace butil {
// Clears internal memory of an STL object.
// STL clear()/reserve(0) does not always free internal memory allocated
// This function uses swap/destructor to ensure the internal memory is freed.
......@@ -196,8 +198,6 @@ bool ContainsKey(const Collection& collection, const Key& key) {
return collection.find(key) != collection.end();
}
namespace butil {
// Returns true if the container is sorted.
template <typename Container>
bool STLIsSorted(const Container& cont) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment