From: Christopher Dykes Date: Fri, 5 May 2017 01:32:45 +0000 (-0700) Subject: Delete operator=(std::string&&) from StringPiece X-Git-Tag: v2017.05.08.00~8 X-Git-Url: http://plrg.eecs.uci.edu/git/?p=folly.git;a=commitdiff_plain;h=1c86749b4bc3c7f0ec85a8e5820e3797e84381c6;ds=sidebyside Delete operator=(std::string&&) from StringPiece Summary: This can only ever be used unsafely, so delete it. Reviewed By: yfeldblum Differential Revision: D4951294 fbshipit-source-id: bbc266d1550fceb48946c7c48e76af07292b4a53 --- diff --git a/folly/Range.h b/folly/Range.h index 9c9b68b2..9e392cf4 100644 --- a/folly/Range.h +++ b/folly/Range.h @@ -359,6 +359,9 @@ public: Range& operator=(const Range& rhs) & = default; Range& operator=(Range&& rhs) & = default; + template ::const_type = 0> + Range& operator=(std::string&& rhs) = delete; + void clear() { b_ = Iter(); e_ = Iter();