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

Side by Side Diff: tests/CPlusPlusEleven.cpp

Issue 1441753002: Replace SkFunction with std::function (Closed) Base URL: https://skia.googlesource.com/skia.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 | « src/gpu/GrTextureParamsAdjuster.h ('k') | tests/FunctionTest.cpp » ('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 * Copyright 2015 Google Inc. 2 * Copyright 2015 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 #include "Test.h" 7 #include "Test.h"
8 #include "SkTemplates.h" 8 #include "SkTemplates.h"
9 #include "SkFunction.h"
10 9
11 namespace { 10 namespace {
12 class Moveable { 11 class Moveable {
13 public: 12 public:
14 Moveable() {} 13 Moveable() {}
15 Moveable(Moveable&&) {} 14 Moveable(Moveable&&) {}
16 Moveable& operator=(Moveable&&) { return *this; } 15 Moveable& operator=(Moveable&&) { return *this; }
17 private: 16 private:
18 Moveable(const Moveable&); 17 Moveable(const Moveable&);
19 Moveable& operator=(const Moveable&); 18 Moveable& operator=(const Moveable&);
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 } 89 }
91 90
92 { 91 {
93 skstd::unique_ptr<const void, Deleter<const void>> u(new Moveable(), Del eter<const void>()); 92 skstd::unique_ptr<const void, Deleter<const void>> u(new Moveable(), Del eter<const void>());
94 static_assert(sizeof(u) == sizeof(SmallUniquePtr), TOO_BIG); 93 static_assert(sizeof(u) == sizeof(SmallUniquePtr), TOO_BIG);
95 94
96 auto u2 = skstd::move(u); 95 auto u2 = skstd::move(u);
97 static_assert(sizeof(u2) == sizeof(SmallUniquePtr), TOO_BIG); 96 static_assert(sizeof(u2) == sizeof(SmallUniquePtr), TOO_BIG);
98 } 97 }
99 } 98 }
OLDNEW
« no previous file with comments | « src/gpu/GrTextureParamsAdjuster.h ('k') | tests/FunctionTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698