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

Unified Diff: util/stdlib/pointer_container.h

Issue 688643002: Fix a few documentation problems (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: Created 6 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « snapshot/test/test_module_snapshot.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: util/stdlib/pointer_container.h
diff --git a/util/stdlib/pointer_container.h b/util/stdlib/pointer_container.h
index dfba51c99e5503b5b733a35a96fb894ac57e8282..23c35d7c2630833dfbcb20fc060e0cc31a26738c 100644
--- a/util/stdlib/pointer_container.h
+++ b/util/stdlib/pointer_container.h
@@ -17,13 +17,18 @@
#include <vector>
+#include "base/basictypes.h"
#include "base/stl_util.h"
namespace crashpad {
-// PointerContainer allows an STL container such as std::vector<> to “own”
-// pointer elements stored in it. When the container is destroyed, “delete” will
-// be called on its pointer elements.
+//! \brief Allows a standard container to “own” pointer elements stored in it.
+//!
+//! When the container is destroyed, `delete` will be called on its pointer
+//! elements.
+//!
+//! \note No attempt is made to `delete` elements that are removed from the
+//! container by other means, such as replacement or `clear()`.
template <typename ContainerType>
class PointerContainer : public ContainerType {
public:
@@ -33,10 +38,19 @@ class PointerContainer : public ContainerType {
private:
STLElementDeleter<ContainerType> pointer_deleter_;
+
+ DISALLOW_COPY_AND_ASSIGN(PointerContainer);
};
+//! \brief Allows a `std::vector` to “own” pointer elements stored in it.
+//!
+//! When the vector is destroyed, `delete` will be called on its pointer
+//! elements.
+//!
+//! \note No attempt is made to `delete` elements that are removed from the
+//! vector by other means, such as replacement or `clear()`.
template <typename T>
-class PointerVector : public PointerContainer<std::vector<T*> > {};
+class PointerVector : public PointerContainer<std::vector<T*>> {};
} // namespace crashpad
« no previous file with comments | « snapshot/test/test_module_snapshot.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698