Make SkNoncopyable movable

SkNoncopyable declares (but does not define) its copy constructor and
copy assignment operator. These are also private so the error for misuse
happens at compile-time instead of link-time.

However, this seems to be from before C++11.

Because other constructors were declared, the compiler does not generate
a move constructor or a move assignment operator. The result of this is
perfectly legal non-copying scenarios are also accidentally blocked. An
example of this is returning the non-copyable type. The object being
returned is a candidate for a move, since it is about to be destroyed.
And in C++17 copy elision is actually guaranteed.

Change-Id: Ia31be9091c644f31a45dd18216330a68be3cf456
Reviewed-on: https://skia-review.googlesource.com/14294
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
1 file changed