| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 // Provides a smart pointer class for intrusively reference-counted objects. | 5 // Provides a smart pointer class for intrusively reference-counted objects. |
| 6 | 6 |
| 7 #ifndef MOJO_EDK_UTIL_REF_PTR_H_ | 7 #ifndef MOJO_EDK_UTIL_REF_PTR_H_ |
| 8 #define MOJO_EDK_UTIL_REF_PTR_H_ | 8 #define MOJO_EDK_UTIL_REF_PTR_H_ |
| 9 | 9 |
| 10 #include <assert.h> | 10 #include <assert.h> |
| 11 #include <cstddef> |
| 11 | 12 |
| 12 #include <cstddef> | |
| 13 #include <utility> | 13 #include <utility> |
| 14 | 14 |
| 15 #include "mojo/edk/util/ref_ptr_internal.h" | 15 #include "mojo/edk/util/ref_ptr_internal.h" |
| 16 #include "mojo/public/cpp/system/macros.h" | 16 #include "mojo/public/cpp/system/macros.h" |
| 17 | 17 |
| 18 namespace mojo { | 18 namespace mojo { |
| 19 namespace util { | 19 namespace util { |
| 20 | 20 |
| 21 // A smart pointer class for intrusively reference-counted objects (e.g., those | 21 // A smart pointer class for intrusively reference-counted objects (e.g., those |
| 22 // subclassing |RefCountedThreadSafe| -- see ref_counted.h). | 22 // subclassing |RefCountedThreadSafe| -- see ref_counted.h). |
| (...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 224 template <typename T, typename... Args> | 224 template <typename T, typename... Args> |
| 225 RefPtr<T> MakeRefCounted(Args&&... args) { | 225 RefPtr<T> MakeRefCounted(Args&&... args) { |
| 226 return internal::MakeRefCountedHelper<T>::MakeRefCounted( | 226 return internal::MakeRefCountedHelper<T>::MakeRefCounted( |
| 227 std::forward<Args>(args)...); | 227 std::forward<Args>(args)...); |
| 228 } | 228 } |
| 229 | 229 |
| 230 } // namespace util | 230 } // namespace util |
| 231 } // namespace mojo | 231 } // namespace mojo |
| 232 | 232 |
| 233 #endif // MOJO_EDK_UTIL_REF_PTR_H_ | 233 #endif // MOJO_EDK_UTIL_REF_PTR_H_ |
| OLD | NEW |