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

Side by Side Diff: base/memory/scoped_ptr.h

Issue 1462843002: Try to remove <algorithm> header from scoped_ptr.h, again. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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 | media/formats/mp2t/ts_section_psi.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 // Scopers help you manage ownership of a pointer, helping you easily manage a 5 // Scopers help you manage ownership of a pointer, helping you easily manage a
6 // pointer within a scope, and automatically destroying the pointer at the end 6 // pointer within a scope, and automatically destroying the pointer at the end
7 // of a scope. There are two main classes you will use, which correspond to the 7 // of a scope. There are two main classes you will use, which correspond to the
8 // operators new/delete and new[]/delete[]. 8 // operators new/delete and new[]/delete[].
9 // 9 //
10 // Example usage (scoped_ptr<T>): 10 // Example usage (scoped_ptr<T>):
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 #ifndef BASE_MEMORY_SCOPED_PTR_H_ 77 #ifndef BASE_MEMORY_SCOPED_PTR_H_
78 #define BASE_MEMORY_SCOPED_PTR_H_ 78 #define BASE_MEMORY_SCOPED_PTR_H_
79 79
80 // This is an implementation designed to match the anticipated future TR2 80 // This is an implementation designed to match the anticipated future TR2
81 // implementation of the scoped_ptr class. 81 // implementation of the scoped_ptr class.
82 82
83 #include <assert.h> 83 #include <assert.h>
84 #include <stddef.h> 84 #include <stddef.h>
85 #include <stdlib.h> 85 #include <stdlib.h>
86 86
87 // TODO(dcheng): Temporary, remove this #include since swap is defined in
88 // <utility> in C++11.
89 #include <algorithm>
90 #include <iosfwd> 87 #include <iosfwd>
91 #include <memory> 88 #include <memory>
92 #include <utility> 89 #include <utility>
93 90
94 #include "base/basictypes.h" 91 #include "base/basictypes.h"
95 #include "base/compiler_specific.h" 92 #include "base/compiler_specific.h"
96 #include "base/move.h" 93 #include "base/move.h"
97 #include "base/template_util.h" 94 #include "base/template_util.h"
98 95
99 namespace base { 96 namespace base {
(...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after
554 scoped_ptr<T> make_scoped_ptr(T* ptr) { 551 scoped_ptr<T> make_scoped_ptr(T* ptr) {
555 return scoped_ptr<T>(ptr); 552 return scoped_ptr<T>(ptr);
556 } 553 }
557 554
558 template <typename T> 555 template <typename T>
559 std::ostream& operator<<(std::ostream& out, const scoped_ptr<T>& p) { 556 std::ostream& operator<<(std::ostream& out, const scoped_ptr<T>& p) {
560 return out << p.get(); 557 return out << p.get();
561 } 558 }
562 559
563 #endif // BASE_MEMORY_SCOPED_PTR_H_ 560 #endif // BASE_MEMORY_SCOPED_PTR_H_
OLDNEW
« no previous file with comments | « no previous file | media/formats/mp2t/ts_section_psi.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698