Bug 778301 - Remove old change for llvm.org/pr11003.
authorRafael Ávila de Espíndola <respindola@mozilla.com>
Sat, 28 Jul 2012 08:04:45 -0400
changeset 106298 0dbf799a2371c4cd9178c1d1eeba1b8763fb361d
parent 106297 c92a53bb1cba9c893b88223422e439d450aa2a30
child 106299 9448db2a1708bfd3fd553d833ed784f68f20c1b1
push idunknown
push userunknown
push dateunknown
bugs778301
milestone17.0a1
Bug 778301 - Remove old change for llvm.org/pr11003.
js/public/Utility.h
--- a/js/public/Utility.h
+++ b/js/public/Utility.h
@@ -851,30 +851,17 @@ namespace js {
  */
 template<typename T>
 class MoveRef {
   public:
     typedef T Referent;
     explicit MoveRef(T &t) : pointer(&t) { }
     T &operator*()  const { return *pointer; }
     T *operator->() const { return  pointer; }
-#if defined(__GXX_EXPERIMENTAL_CXX0X__) && defined(__clang__)
-    /*
-     * If MoveRef is used in a rvalue position (which is expected), we can
-     * end up in a situation where, without this ifdef, we would try to pass
-     * a T& to a move constructor, which fails. It is not clear if the compiler
-     * should instead use the copy constructor, but for now this lets us build
-     * with clang. See bug 689066 and llvm.org/pr11003 for the details.
-     * Note: We can probably remove MoveRef completely once we are comfortable
-     * using c++11.
-     */
-    operator T&& ()  const { return static_cast<T&&>(*pointer); }
-#else
     operator T& ()   const { return *pointer; }
-#endif
   private:
     T *pointer;
 };
 
 template<typename T>
 MoveRef<T> Move(T &t) { return MoveRef<T>(t); }
 
 template<typename T>