Bug 1142376 - Allow copying of mozilla::Pair objects. r=waldo
authorSeth Fowler <seth@mozilla.com>
Thu, 12 Mar 2015 17:44:30 -0700
changeset 262307 d3f34e3bffcea6d2189fb69128c6dfef96af986b
parent 262306 70bccab35a0286eae6522cb973e70fff71362fb2
child 262308 05848c0df2f87e975bb53d39c44fab02876a22a0
push id4718
push userraliiev@mozilla.com
push dateMon, 11 May 2015 18:39:53 +0000
treeherdermozilla-beta@c20c4ef55f08 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerswaldo
bugs1142376
milestone39.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1142376 - Allow copying of mozilla::Pair objects. r=waldo
mfbt/Pair.h
--- a/mfbt/Pair.h
+++ b/mfbt/Pair.h
@@ -159,26 +159,25 @@ public:
   Pair(AArg&& aA, BArg&& aB)
     : Base(Forward<AArg>(aA), Forward<BArg>(aB))
   {}
 
   Pair(Pair&& aOther)
     : Base(Move(aOther.first()), Move(aOther.second()))
   { }
 
+  Pair(const Pair& aOther) = default;
+
   /** The A instance. */
   using Base::first;
   /** The B instance. */
   using Base::second;
 
   /** Swap this pair with another pair. */
   void swap(Pair& aOther) { Base::swap(aOther); }
-
-private:
-  Pair(const Pair&) = delete;
 };
 
 template<typename A, class B>
 void
 Swap(Pair<A, B>& aX, Pair<A, B>& aY)
 {
   aX.swap(aY);
 }