From: Chandler Carruth Date: Sat, 1 Mar 2014 09:27:28 +0000 (+0000) Subject: [C++11] Remove the R-value reference #if usage from the ADT and Support X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=e56ffb951f76424cd6e9cc795bfc3b2e8033798f;p=oota-llvm.git [C++11] Remove the R-value reference #if usage from the ADT and Support libraries. It is now always 1 in LLVM builds. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202580 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/ADT/APInt.h b/include/llvm/ADT/APInt.h index 85335cff101..aa3c3f67ec1 100644 --- a/include/llvm/ADT/APInt.h +++ b/include/llvm/ADT/APInt.h @@ -284,12 +284,10 @@ public: initSlowCase(that); } -#if LLVM_HAS_RVALUE_REFERENCES /// \brief Move Constructor. APInt(APInt &&that) : BitWidth(that.BitWidth), VAL(that.VAL) { that.BitWidth = 0; } -#endif /// \brief Destructor. ~APInt() { @@ -656,7 +654,6 @@ public: return AssignSlowCase(RHS); } -#if LLVM_HAS_RVALUE_REFERENCES /// @brief Move assignment operator. APInt &operator=(APInt &&that) { if (!isSingleWord()) @@ -669,7 +666,6 @@ public: return *this; } -#endif /// \brief Assignment operator. /// diff --git a/include/llvm/ADT/BitVector.h b/include/llvm/ADT/BitVector.h index 6f69aba7c01..e1aa0826cb6 100644 --- a/include/llvm/ADT/BitVector.h +++ b/include/llvm/ADT/BitVector.h @@ -98,12 +98,10 @@ public: std::memcpy(Bits, RHS.Bits, Capacity * sizeof(BitWord)); } -#if LLVM_HAS_RVALUE_REFERENCES BitVector(BitVector &&RHS) : Bits(RHS.Bits), Size(RHS.Size), Capacity(RHS.Capacity) { RHS.Bits = 0; } -#endif ~BitVector() { std::free(Bits); @@ -461,7 +459,6 @@ public: return *this; } -#if LLVM_HAS_RVALUE_REFERENCES const BitVector &operator=(BitVector &&RHS) { if (this == &RHS) return *this; @@ -474,7 +471,6 @@ public: return *this; } -#endif void swap(BitVector &RHS) { std::swap(Bits, RHS.Bits); diff --git a/include/llvm/ADT/DenseMap.h b/include/llvm/ADT/DenseMap.h index 0e5d343ac68..abbb453a2e1 100644 --- a/include/llvm/ADT/DenseMap.h +++ b/include/llvm/ADT/DenseMap.h @@ -161,7 +161,6 @@ public: return std::make_pair(iterator(TheBucket, getBucketsEnd(), true), true); } -#if LLVM_HAS_RVALUE_REFERENCES // Inserts key,value pair into the map if the key isn't already in the map. // If the key is already in the map, it returns false and doesn't update the // value. @@ -177,8 +176,7 @@ public: TheBucket); return std::make_pair(iterator(TheBucket, getBucketsEnd(), true), true); } -#endif - + /// insert - Range insertion of pairs. template void insert(InputIt I, InputIt E) { @@ -218,7 +216,6 @@ public: return FindAndConstruct(Key).second; } -#if LLVM_HAS_RVALUE_REFERENCES value_type& FindAndConstruct(KeyT &&Key) { BucketT *TheBucket; if (LookupBucketFor(Key, TheBucket)) @@ -230,7 +227,6 @@ public: ValueT &operator[](KeyT &&Key) { return FindAndConstruct(std::move(Key)).second; } -#endif /// isPointerIntoBucketsArray - Return true if the specified pointer points /// somewhere into the DenseMap's array of buckets (i.e. either to a key or @@ -403,7 +399,6 @@ private: return TheBucket; } -#if LLVM_HAS_RVALUE_REFERENCES BucketT *InsertIntoBucket(const KeyT &Key, ValueT &&Value, BucketT *TheBucket) { TheBucket = InsertIntoBucketImpl(Key, TheBucket); @@ -420,7 +415,6 @@ private: new (&TheBucket->second) ValueT(std::move(Value)); return TheBucket; } -#endif BucketT *InsertIntoBucketImpl(const KeyT &Key, BucketT *TheBucket) { // If the load of the hash table is more than 3/4, or if fewer than 1/8 of @@ -555,12 +549,10 @@ public: copyFrom(other); } -#if LLVM_HAS_RVALUE_REFERENCES DenseMap(DenseMap &&other) : BaseT() { init(0); swap(other); } -#endif template DenseMap(const InputIt &I, const InputIt &E) { @@ -585,7 +577,6 @@ public: return *this; } -#if LLVM_HAS_RVALUE_REFERENCES DenseMap& operator=(DenseMap &&other) { this->destroyAll(); operator delete(Buckets); @@ -593,7 +584,6 @@ public: swap(other); return *this; } -#endif void copyFrom(const DenseMap& other) { this->destroyAll(); @@ -719,12 +709,10 @@ public: copyFrom(other); } -#if LLVM_HAS_RVALUE_REFERENCES SmallDenseMap(SmallDenseMap &&other) : BaseT() { init(0); swap(other); } -#endif template SmallDenseMap(const InputIt &I, const InputIt &E) { @@ -814,7 +802,6 @@ public: return *this; } -#if LLVM_HAS_RVALUE_REFERENCES SmallDenseMap& operator=(SmallDenseMap &&other) { this->destroyAll(); deallocateBuckets(); @@ -822,7 +809,6 @@ public: swap(other); return *this; } -#endif void copyFrom(const SmallDenseMap& other) { this->destroyAll(); diff --git a/include/llvm/ADT/IntrusiveRefCntPtr.h b/include/llvm/ADT/IntrusiveRefCntPtr.h index b8b88619957..6ab6d1b0e58 100644 --- a/include/llvm/ADT/IntrusiveRefCntPtr.h +++ b/include/llvm/ADT/IntrusiveRefCntPtr.h @@ -123,7 +123,6 @@ namespace llvm { retain(); } -#if LLVM_HAS_RVALUE_REFERENCES IntrusiveRefCntPtr(IntrusiveRefCntPtr&& S) : Obj(S.Obj) { S.Obj = 0; } @@ -132,7 +131,6 @@ namespace llvm { IntrusiveRefCntPtr(IntrusiveRefCntPtr&& S) : Obj(S.getPtr()) { S.Obj = 0; } -#endif template IntrusiveRefCntPtr(const IntrusiveRefCntPtr& S) diff --git a/include/llvm/ADT/Optional.h b/include/llvm/ADT/Optional.h index 56033c074b5..ae8344da76a 100644 --- a/include/llvm/ADT/Optional.h +++ b/include/llvm/ADT/Optional.h @@ -20,10 +20,7 @@ #include "llvm/Support/AlignOf.h" #include "llvm/Support/Compiler.h" #include - -#if LLVM_HAS_RVALUE_REFERENCES #include -#endif namespace llvm { @@ -42,7 +39,6 @@ public: new (storage.buffer) T(*O); } -#if LLVM_HAS_RVALUE_REFERENCES Optional(T &&y) : hasVal(true) { new (storage.buffer) T(std::forward(y)); } @@ -70,7 +66,6 @@ public: } return *this; } -#endif static inline Optional create(const T* y) { return y ? Optional(*y) : Optional(); diff --git a/include/llvm/ADT/OwningPtr.h b/include/llvm/ADT/OwningPtr.h index 6b9e42eaec0..3347ccd4a42 100644 --- a/include/llvm/ADT/OwningPtr.h +++ b/include/llvm/ADT/OwningPtr.h @@ -32,14 +32,12 @@ class OwningPtr { public: explicit OwningPtr(T *P = 0) : Ptr(P) {} -#if LLVM_HAS_RVALUE_REFERENCES OwningPtr(OwningPtr &&Other) : Ptr(Other.take()) {} OwningPtr &operator=(OwningPtr &&Other) { reset(Other.take()); return *this; } -#endif ~OwningPtr() { delete Ptr; @@ -96,14 +94,12 @@ class OwningArrayPtr { public: explicit OwningArrayPtr(T *P = 0) : Ptr(P) {} -#if LLVM_HAS_RVALUE_REFERENCES OwningArrayPtr(OwningArrayPtr &&Other) : Ptr(Other.take()) {} OwningArrayPtr &operator=(OwningArrayPtr &&Other) { reset(Other.take()); return *this; } -#endif ~OwningArrayPtr() { delete [] Ptr; diff --git a/include/llvm/ADT/SmallBitVector.h b/include/llvm/ADT/SmallBitVector.h index 86949b2ae34..e965bc46432 100644 --- a/include/llvm/ADT/SmallBitVector.h +++ b/include/llvm/ADT/SmallBitVector.h @@ -153,11 +153,9 @@ public: switchToLarge(new BitVector(*RHS.getPointer())); } -#if LLVM_HAS_RVALUE_REFERENCES SmallBitVector(SmallBitVector &&RHS) : X(RHS.X) { RHS.X = 1; } -#endif ~SmallBitVector() { if (!isSmall()) @@ -506,7 +504,6 @@ public: return *this; } -#if LLVM_HAS_RVALUE_REFERENCES const SmallBitVector &operator=(SmallBitVector &&RHS) { if (this != &RHS) { clear(); @@ -514,7 +511,6 @@ public: } return *this; } -#endif void swap(SmallBitVector &RHS) { std::swap(X, RHS.X); diff --git a/include/llvm/ADT/SmallPtrSet.h b/include/llvm/ADT/SmallPtrSet.h index 03d8990cb48..67104f3cae5 100644 --- a/include/llvm/ADT/SmallPtrSet.h +++ b/include/llvm/ADT/SmallPtrSet.h @@ -62,10 +62,8 @@ protected: // Helpers to copy and move construct a SmallPtrSet. SmallPtrSetImplBase(const void **SmallStorage, const SmallPtrSetImplBase &that); -#if LLVM_HAS_RVALUE_REFERENCES SmallPtrSetImplBase(const void **SmallStorage, unsigned SmallSize, SmallPtrSetImplBase &&that); -#endif explicit SmallPtrSetImplBase(const void **SmallStorage, unsigned SmallSize) : SmallArray(SmallStorage), CurArray(SmallStorage), CurArraySize(SmallSize) { assert(SmallSize && (SmallSize & (SmallSize-1)) == 0 && @@ -139,9 +137,7 @@ protected: void swap(SmallPtrSetImplBase &RHS); void CopyFrom(const SmallPtrSetImplBase &RHS); -#if LLVM_HAS_RVALUE_REFERENCES void MoveFrom(unsigned SmallSize, SmallPtrSetImplBase &&RHS); -#endif }; /// SmallPtrSetIteratorImpl - This is the common base class shared between all @@ -247,11 +243,9 @@ protected: // Constructors that forward to the base. SmallPtrSetImpl(const void **SmallStorage, const SmallPtrSetImpl &that) : SmallPtrSetImplBase(SmallStorage, that) {} -#if LLVM_HAS_RVALUE_REFERENCES SmallPtrSetImpl(const void **SmallStorage, unsigned SmallSize, SmallPtrSetImpl &&that) : SmallPtrSetImplBase(SmallStorage, SmallSize, std::move(that)) {} -#endif explicit SmallPtrSetImpl(const void **SmallStorage, unsigned SmallSize) : SmallPtrSetImplBase(SmallStorage, SmallSize) {} @@ -304,10 +298,8 @@ class SmallPtrSet : public SmallPtrSetImpl { public: SmallPtrSet() : BaseT(SmallStorage, SmallSizePowTwo) {} SmallPtrSet(const SmallPtrSet &that) : BaseT(SmallStorage, that) {} -#if LLVM_HAS_RVALUE_REFERENCES SmallPtrSet(SmallPtrSet &&that) : BaseT(SmallStorage, SmallSizePowTwo, std::move(that)) {} -#endif template SmallPtrSet(It I, It E) : BaseT(SmallStorage, SmallSizePowTwo) { @@ -321,14 +313,12 @@ public: return *this; } -#if LLVM_HAS_RVALUE_REFERENCES SmallPtrSet& operator=(SmallPtrSet &&RHS) { if (&RHS != this) this->MoveFrom(SmallSizePowTwo, std::move(RHS)); return *this; } -#endif /// swap - Swaps the elements of two sets. void swap(SmallPtrSet &RHS) { diff --git a/include/llvm/ADT/SmallVector.h b/include/llvm/ADT/SmallVector.h index 505aa8d8ae6..2a5168c261f 100644 --- a/include/llvm/ADT/SmallVector.h +++ b/include/llvm/ADT/SmallVector.h @@ -183,13 +183,9 @@ protected: /// std::move, but not all stdlibs actually provide that. template static It2 move(It1 I, It1 E, It2 Dest) { -#if LLVM_HAS_RVALUE_REFERENCES for (; I != E; ++I, ++Dest) *Dest = ::std::move(*I); return Dest; -#else - return ::std::copy(I, E, Dest); -#endif } /// move_backward - Use move-assignment to move the range @@ -198,25 +194,17 @@ protected: /// std::move_backward, but not all stdlibs actually provide that. template static It2 move_backward(It1 I, It1 E, It2 Dest) { -#if LLVM_HAS_RVALUE_REFERENCES while (I != E) *--Dest = ::std::move(*--E); return Dest; -#else - return ::std::copy_backward(I, E, Dest); -#endif } /// uninitialized_move - Move the range [I, E) into the uninitialized /// memory starting with "Dest", constructing elements as needed. template static void uninitialized_move(It1 I, It1 E, It2 Dest) { -#if LLVM_HAS_RVALUE_REFERENCES for (; I != E; ++I, ++Dest) ::new ((void*) &*Dest) T(::std::move(*I)); -#else - ::std::uninitialized_copy(I, E, Dest); -#endif } /// uninitialized_copy - Copy the range [I, E) onto the uninitialized @@ -244,7 +232,6 @@ public: goto Retry; } -#if LLVM_HAS_RVALUE_REFERENCES void push_back(T &&Elt) { if (this->EndX < this->CapacityX) { Retry: @@ -255,8 +242,7 @@ public: this->grow(); goto Retry; } -#endif - + void pop_back() { this->setEnd(this->end()-1); this->end()->~T(); @@ -428,11 +414,7 @@ public: } T LLVM_ATTRIBUTE_UNUSED_RESULT pop_back_val() { -#if LLVM_HAS_RVALUE_REFERENCES T Result = ::std::move(this->back()); -#else - T Result = this->back(); -#endif this->pop_back(); return Result; } @@ -501,7 +483,6 @@ public: return(N); } -#if LLVM_HAS_RVALUE_REFERENCES iterator insert(iterator I, T &&Elt) { if (I == this->end()) { // Important special case for empty vector. this->push_back(::std::move(Elt)); @@ -532,7 +513,6 @@ public: I = this->begin()+EltNo; goto Retry; } -#endif iterator insert(iterator I, const T &Elt) { if (I == this->end()) { // Important special case for empty vector. @@ -673,9 +653,7 @@ public: SmallVectorImpl &operator=(const SmallVectorImpl &RHS); -#if LLVM_HAS_RVALUE_REFERENCES SmallVectorImpl &operator=(SmallVectorImpl &&RHS); -#endif bool operator==(const SmallVectorImpl &RHS) const { if (this->size() != RHS.size()) return false; @@ -793,7 +771,6 @@ SmallVectorImpl &SmallVectorImpl:: return *this; } -#if LLVM_HAS_RVALUE_REFERENCES template SmallVectorImpl &SmallVectorImpl::operator=(SmallVectorImpl &&RHS) { // Avoid self-assignment. @@ -855,7 +832,6 @@ SmallVectorImpl &SmallVectorImpl::operator=(SmallVectorImpl &&RHS) { RHS.clear(); return *this; } -#endif /// Storage for the SmallVector elements which aren't contained in /// SmallVectorTemplateCommon. There are 'N-1' elements here. The remaining '1' @@ -904,7 +880,6 @@ public: return *this; } -#if LLVM_HAS_RVALUE_REFERENCES SmallVector(SmallVector &&RHS) : SmallVectorImpl(N) { if (!RHS.empty()) SmallVectorImpl::operator=(::std::move(RHS)); @@ -914,8 +889,6 @@ public: SmallVectorImpl::operator=(::std::move(RHS)); return *this; } -#endif - }; template diff --git a/include/llvm/ADT/TinyPtrVector.h b/include/llvm/ADT/TinyPtrVector.h index cc0e7b63819..5b5b1b547fe 100644 --- a/include/llvm/ADT/TinyPtrVector.h +++ b/include/llvm/ADT/TinyPtrVector.h @@ -70,7 +70,6 @@ public: return *this; } -#if LLVM_HAS_RVALUE_REFERENCES TinyPtrVector(TinyPtrVector &&RHS) : Val(RHS.Val) { RHS.Val = (EltTy)0; } @@ -98,7 +97,6 @@ public: RHS.Val = (EltTy)0; return *this; } -#endif // implicit conversion operator to ArrayRef. operator ArrayRef() const { diff --git a/include/llvm/ADT/polymorphic_ptr.h b/include/llvm/ADT/polymorphic_ptr.h index b8d8d71238e..449e9981928 100644 --- a/include/llvm/ADT/polymorphic_ptr.h +++ b/include/llvm/ADT/polymorphic_ptr.h @@ -40,9 +40,7 @@ template class polymorphic_ptr { public: polymorphic_ptr(T *ptr = 0) : ptr(ptr) {} polymorphic_ptr(const polymorphic_ptr &arg) : ptr(arg ? arg->clone() : 0) {} -#if LLVM_HAS_RVALUE_REFERENCES polymorphic_ptr(polymorphic_ptr &&arg) : ptr(arg.take()) {} -#endif ~polymorphic_ptr() { delete ptr; } polymorphic_ptr &operator=(polymorphic_ptr arg) { diff --git a/include/llvm/Support/Compiler.h b/include/llvm/Support/Compiler.h index 85837383247..9d273a68c66 100644 --- a/include/llvm/Support/Compiler.h +++ b/include/llvm/Support/Compiler.h @@ -98,13 +98,9 @@ # define LLVM_HAS_VARIADIC_TEMPLATES 0 #endif -/// llvm_move - Expands to ::std::move if the compiler supports -/// r-value references; otherwise, expands to the argument. -#if LLVM_HAS_RVALUE_REFERENCES +/// llvm_move - Expands to ::std::move. This is a hold-over from when we did +/// not support R-value references. #define llvm_move(value) (::std::move(value)) -#else -#define llvm_move(value) (value) -#endif /// Expands to '&' if r-value references are supported. /// diff --git a/include/llvm/Support/ConstantRange.h b/include/llvm/Support/ConstantRange.h index f757c6ea60f..5558c87ce87 100644 --- a/include/llvm/Support/ConstantRange.h +++ b/include/llvm/Support/ConstantRange.h @@ -42,13 +42,8 @@ namespace llvm { class ConstantRange { APInt Lower, Upper; -#if LLVM_HAS_RVALUE_REFERENCES // If we have move semantics, pass APInts by value and move them into place. typedef APInt APIntMoveTy; -#else - // Otherwise pass by const ref to save one copy. - typedef const APInt &APIntMoveTy; -#endif public: /// Initialize a full (the default) or empty set for the specified bit width. diff --git a/include/llvm/Support/ErrorOr.h b/include/llvm/Support/ErrorOr.h index 1e29b3d3529..6033d8a97e5 100644 --- a/include/llvm/Support/ErrorOr.h +++ b/include/llvm/Support/ErrorOr.h @@ -26,7 +26,6 @@ #endif namespace llvm { -#if LLVM_HAS_CXX11_TYPETRAITS && LLVM_HAS_RVALUE_REFERENCES template typename std::enable_if< std::is_constructible::value , typename std::remove_reference::type>::type && @@ -40,12 +39,6 @@ typename std::enable_if< !std::is_constructible::value moveIfMoveConstructible(V &Val) { return Val; } -#else -template -V &moveIfMoveConstructible(V &Val) { - return Val; -} -#endif /// \brief Stores a reference that can be changed. template @@ -143,7 +136,6 @@ public: return *this; } -#if LLVM_HAS_RVALUE_REFERENCES ErrorOr(ErrorOr &&Other) { moveConstruct(std::move(Other)); } @@ -163,7 +155,6 @@ public: moveAssign(std::move(Other)); return *this; } -#endif ~ErrorOr() { if (!HasError) @@ -223,7 +214,6 @@ private: new (this) ErrorOr(Other); } -#if LLVM_HAS_RVALUE_REFERENCES template void moveConstruct(ErrorOr &&Other) { if (!Other.HasError) { @@ -245,7 +235,6 @@ private: this->~ErrorOr(); new (this) ErrorOr(std::move(Other)); } -#endif pointer toPointer(pointer Val) { return Val; diff --git a/include/llvm/Support/FileSystem.h b/include/llvm/Support/FileSystem.h index d975a914ff1..6f7dc315e8d 100644 --- a/include/llvm/Support/FileSystem.h +++ b/include/llvm/Support/FileSystem.h @@ -664,10 +664,8 @@ private: public: typedef char char_type; -#if LLVM_HAS_RVALUE_REFERENCES mapped_file_region(mapped_file_region&&); mapped_file_region &operator =(mapped_file_region&&); -#endif /// Construct a mapped_file_region at \a path starting at \a offset of length /// \a length and with access \a mode. diff --git a/include/llvm/Support/Regex.h b/include/llvm/Support/Regex.h index 5f1031ef361..2eea369ee4b 100644 --- a/include/llvm/Support/Regex.h +++ b/include/llvm/Support/Regex.h @@ -52,13 +52,11 @@ namespace llvm { std::swap(error, regex.error); return *this; } -#if LLVM_HAS_RVALUE_REFERENCES Regex(Regex &®ex) { preg = regex.preg; error = regex.error; regex.preg = NULL; } -#endif ~Regex(); /// isValid - returns the error encountered during regex compilation, or diff --git a/lib/Support/SmallPtrSet.cpp b/lib/Support/SmallPtrSet.cpp index f7b8a7723cf..844e41696f9 100644 --- a/lib/Support/SmallPtrSet.cpp +++ b/lib/Support/SmallPtrSet.cpp @@ -186,7 +186,6 @@ SmallPtrSetImplBase::SmallPtrSetImplBase(const void **SmallStorage, NumTombstones = that.NumTombstones; } -#if LLVM_HAS_RVALUE_REFERENCES SmallPtrSetImplBase::SmallPtrSetImplBase(const void **SmallStorage, unsigned SmallSize, SmallPtrSetImplBase &&that) { @@ -214,7 +213,6 @@ SmallPtrSetImplBase::SmallPtrSetImplBase(const void **SmallStorage, that.NumElements = 0; that.NumTombstones = 0; } -#endif /// CopyFrom - implement operator= from a smallptrset that has the same pointer /// type, but may have a different small size. @@ -254,7 +252,6 @@ void SmallPtrSetImplBase::CopyFrom(const SmallPtrSetImplBase &RHS) { NumTombstones = RHS.NumTombstones; } -#if LLVM_HAS_RVALUE_REFERENCES void SmallPtrSetImplBase::MoveFrom(unsigned SmallSize, SmallPtrSetImplBase &&RHS) { assert(&RHS != this && "Self-move should be handled by the caller."); @@ -282,7 +279,6 @@ void SmallPtrSetImplBase::MoveFrom(unsigned SmallSize, RHS.NumElements = 0; RHS.NumTombstones = 0; } -#endif void SmallPtrSetImplBase::swap(SmallPtrSetImplBase &RHS) { if (this == &RHS) return; diff --git a/lib/Support/Unix/Path.inc b/lib/Support/Unix/Path.inc index 2249b64b451..caa30c7533a 100644 --- a/lib/Support/Unix/Path.inc +++ b/lib/Support/Unix/Path.inc @@ -538,12 +538,10 @@ mapped_file_region::~mapped_file_region() { ::munmap(Mapping, Size); } -#if LLVM_HAS_RVALUE_REFERENCES mapped_file_region::mapped_file_region(mapped_file_region &&other) : Mode(other.Mode), Size(other.Size), Mapping(other.Mapping) { other.Mapping = 0; } -#endif mapped_file_region::mapmode mapped_file_region::flags() const { assert(Mapping && "Mapping failed but used anyway!"); diff --git a/lib/Support/Windows/Path.inc b/lib/Support/Windows/Path.inc index 98b2767c011..c39600357be 100644 --- a/lib/Support/Windows/Path.inc +++ b/lib/Support/Windows/Path.inc @@ -659,7 +659,6 @@ mapped_file_region::~mapped_file_region() { ::UnmapViewOfFile(Mapping); } -#if LLVM_HAS_RVALUE_REFERENCES mapped_file_region::mapped_file_region(mapped_file_region &&other) : Mode(other.Mode) , Size(other.Size) @@ -671,7 +670,6 @@ mapped_file_region::mapped_file_region(mapped_file_region &&other) other.FileHandle = INVALID_HANDLE_VALUE; other.FileDescriptor = 0; } -#endif mapped_file_region::mapmode mapped_file_region::flags() const { assert(Mapping && "Mapping failed but used anyway!");