2691d76a06
TBR=reed@google.com Committed: https://skia.googlesource.com/skia/+/20c1e3abfc681771f73eb19fde7284196e028940 Committed: https://skia.googlesource.com/skia/+/3dd9ed37c24611af86f0fe374bd3698b63f09450 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1780933003 Review URL: https://codereview.chromium.org/1780933003
31 lines
747 B
C++
31 lines
747 B
C++
/*
|
|
* Copyright 2015 Google Inc.
|
|
*
|
|
* Use of this source code is governed by a BSD-style license that can be
|
|
* found in the LICENSE file.
|
|
*/
|
|
#include "Test.h"
|
|
#include "SkTemplates.h"
|
|
#include <utility>
|
|
|
|
namespace {
|
|
class Moveable {
|
|
public:
|
|
Moveable() {}
|
|
Moveable(Moveable&&) {}
|
|
Moveable& operator=(Moveable&&) { return *this; }
|
|
private:
|
|
Moveable(const Moveable&);
|
|
Moveable& operator=(const Moveable&);
|
|
};
|
|
template <typename T> void deleter(T*) { }
|
|
template <typename T> struct Deleter {
|
|
void operator()(T* t) { delete static_cast<const Moveable*>(t); }
|
|
};
|
|
} // namespace
|
|
|
|
DEF_TEST(CPlusPlusEleven_RvalueAndMove, r) {
|
|
Moveable src1; Moveable dst1(std::move(src1));
|
|
Moveable src2, dst2; dst2 = std::move(src2);
|
|
}
|