Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(110)

Side by Side Diff: base/stl_util.h

Issue 23540009: test IWYU fixups for base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: include iterator in a couple more files Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | base/time/time.h » ('j') | sync/notifier/p2p_invalidator.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Derived from google3/util/gtl/stl_util.h 5 // Derived from google3/util/gtl/stl_util.h
6 6
7 #ifndef BASE_STL_UTIL_H_ 7 #ifndef BASE_STL_UTIL_H_
8 #define BASE_STL_UTIL_H_ 8 #define BASE_STL_UTIL_H_
9 9
10 #include <algorithm> 10 #include <algorithm>
11 #include <functional> 11 #include <functional>
12 #include <iterator>
12 #include <string> 13 #include <string>
13 #include <vector> 14 #include <vector>
14 15
15 #include "base/logging.h" 16 #include "base/logging.h"
16 17
17 // Clears internal memory of an STL object. 18 // Clears internal memory of an STL object.
18 // STL clear()/reserve(0) does not always free internal memory allocated 19 // STL clear()/reserve(0) does not always free internal memory allocated
19 // This function uses swap/destructor to ensure the internal memory is freed. 20 // This function uses swap/destructor to ensure the internal memory is freed.
20 template<class T> 21 template<class T>
21 void STLClearObject(T* obj) { 22 void STLClearObject(T* obj) {
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 ResultType difference; 214 ResultType difference;
214 std::set_difference(a1.begin(), a1.end(), 215 std::set_difference(a1.begin(), a1.end(),
215 a2.begin(), a2.end(), 216 a2.begin(), a2.end(),
216 std::inserter(difference, difference.end())); 217 std::inserter(difference, difference.end()));
217 return difference; 218 return difference;
218 } 219 }
219 220
220 } // namespace base 221 } // namespace base
221 222
222 #endif // BASE_STL_UTIL_H_ 223 #endif // BASE_STL_UTIL_H_
OLDNEW
« no previous file with comments | « no previous file | base/time/time.h » ('j') | sync/notifier/p2p_invalidator.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698