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

Side by Side Diff: courgette/memory_allocator.h

Issue 6767003: Using an explicit constructor for courgette:MemoryAllocator is incompatible with the implementati... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | 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) 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 #ifndef COURGETTE_MEMORY_ALLOCATOR_H_ 5 #ifndef COURGETTE_MEMORY_ALLOCATOR_H_
6 #define COURGETTE_MEMORY_ALLOCATOR_H_ 6 #define COURGETTE_MEMORY_ALLOCATOR_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 174
175 template<class OtherT> 175 template<class OtherT>
176 struct rebind { 176 struct rebind {
177 // convert an MemoryAllocator<T> to a MemoryAllocator<OtherT> 177 // convert an MemoryAllocator<T> to a MemoryAllocator<OtherT>
178 typedef MemoryAllocator<OtherT> other; 178 typedef MemoryAllocator<OtherT> other;
179 }; 179 };
180 180
181 MemoryAllocator() _THROW0() { 181 MemoryAllocator() _THROW0() {
182 } 182 }
183 183
184 explicit MemoryAllocator(const MemoryAllocator<T>& other) _THROW0() { 184 // We can't use an explicit constructor here, as dictated by our style guide.
185 // The implementation of basic_string in Visual Studio 2010 prevents this.
186 MemoryAllocator(const MemoryAllocator<T>& other) _THROW0() {
185 } 187 }
186 188
187 template<class OtherT> 189 template<class OtherT>
188 explicit MemoryAllocator(const MemoryAllocator<OtherT>& other) _THROW0() { 190 explicit MemoryAllocator(const MemoryAllocator<OtherT>& other) _THROW0() {
189 } 191 }
190 192
191 ~MemoryAllocator() { 193 ~MemoryAllocator() {
192 } 194 }
193 195
194 void deallocate(pointer ptr, size_type size) { 196 void deallocate(pointer ptr, size_type size) {
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 template<class T> 258 template<class T>
257 class MemoryAllocator : public std::allocator<T> { 259 class MemoryAllocator : public std::allocator<T> {
258 public: 260 public:
259 }; 261 };
260 262
261 #endif // OS_WIN 263 #endif // OS_WIN
262 264
263 } // namespace courgette 265 } // namespace courgette
264 266
265 #endif // COURGETTE_MEMORY_ALLOCATOR_H_ 267 #endif // COURGETTE_MEMORY_ALLOCATOR_H_
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698