OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 #ifndef CONTENT_BROWSER_INDEXED_DB_LIST_SET_H_ | 5 #ifndef CONTENT_BROWSER_INDEXED_DB_LIST_SET_H_ |
6 #define CONTENT_BROWSER_INDEXED_DB_LIST_SET_H_ | 6 #define CONTENT_BROWSER_INDEXED_DB_LIST_SET_H_ |
7 | 7 |
| 8 #include <stddef.h> |
| 9 |
8 #include <algorithm> | 10 #include <algorithm> |
9 #include <iterator> | 11 #include <iterator> |
10 #include <list> | 12 #include <list> |
11 #include <set> | 13 #include <set> |
12 #include "base/logging.h" | 14 #include "base/logging.h" |
13 #include "base/memory/scoped_ptr.h" | 15 #include "base/memory/scoped_ptr.h" |
14 | 16 |
15 // | 17 // |
16 // A container class that provides fast containment test (like a set) | 18 // A container class that provides fast containment test (like a set) |
17 // but maintains insertion order for iteration (like list). | 19 // but maintains insertion order for iteration (like list). |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 std::set<T> set_; | 156 std::set<T> set_; |
155 }; | 157 }; |
156 | 158 |
157 // Prevent instantiation of list_set<scoped_ptr<T>> as the current | 159 // Prevent instantiation of list_set<scoped_ptr<T>> as the current |
158 // implementation would fail. | 160 // implementation would fail. |
159 // TODO(jsbell): Support scoped_ptr through specialization. | 161 // TODO(jsbell): Support scoped_ptr through specialization. |
160 template <typename T> | 162 template <typename T> |
161 class list_set<scoped_ptr<T> >; | 163 class list_set<scoped_ptr<T> >; |
162 | 164 |
163 #endif // CONTENT_BROWSER_INDEXED_DB_LIST_SET_H_ | 165 #endif // CONTENT_BROWSER_INDEXED_DB_LIST_SET_H_ |
OLD | NEW |