| OLD | NEW |
| 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 Loading... |
| 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 } |
| OLD | NEW |