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

Side by Side Diff: include/private/SkTemplates.h

Issue 1561683002: Start using <type_traits> and <utility> (C++11). (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix skstd::unique_ptr::compressed_pair. Created 4 years, 11 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
« no previous file with comments | « include/private/SkTLogic.h ('k') | include/private/SkUniquePtr.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2006 The Android Open Source Project 3 * Copyright 2006 The Android Open Source Project
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 9
10 #ifndef SkTemplates_DEFINED 10 #ifndef SkTemplates_DEFINED
11 #define SkTemplates_DEFINED 11 #define SkTemplates_DEFINED
12 12
13 #include "SkMath.h" 13 #include "SkMath.h"
14 #include "SkTLogic.h" 14 #include "SkTLogic.h"
15 #include "SkTypes.h" 15 #include "SkTypes.h"
16 #include "SkUniquePtr.h" 16 #include "SkUniquePtr.h"
17 #include "SkUtility.h"
18 #include <limits.h> 17 #include <limits.h>
19 #include <new> 18 #include <new>
20 19
21 /** \file SkTemplates.h 20 /** \file SkTemplates.h
22 21
23 This file contains light-weight template classes for type-safe and exception -safe 22 This file contains light-weight template classes for type-safe and exception -safe
24 resource management. 23 resource management.
25 */ 24 */
26 25
27 /** 26 /**
(...skipping 422 matching lines...) Expand 10 before | Expand all | Expand 10 after
450 * Returns void* because this object does not initialize the 449 * Returns void* because this object does not initialize the
451 * memory. Use placement new for types that require a cons. 450 * memory. Use placement new for types that require a cons.
452 */ 451 */
453 void* get() { return fStorage.get(); } 452 void* get() { return fStorage.get(); }
454 const void* get() const { return fStorage.get(); } 453 const void* get() const { return fStorage.get(); }
455 private: 454 private:
456 SkAlignedSStorage<sizeof(T)*N> fStorage; 455 SkAlignedSStorage<sizeof(T)*N> fStorage;
457 }; 456 };
458 457
459 #endif 458 #endif
OLDNEW
« no previous file with comments | « include/private/SkTLogic.h ('k') | include/private/SkUniquePtr.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698