From 1c86749b4bc3c7f0ec85a8e5820e3797e84381c6 Mon Sep 17 00:00:00 2001 From: Christopher Dykes Date: Thu, 4 May 2017 18:32:45 -0700 Subject: [PATCH] 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 --- folly/Range.h | 3 +++ 1 file changed, 3 insertions(+) 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(); -- 2.34.1