Index: test/support/test_allocator.h =================================================================== --- test/support/test_allocator.h +++ test/support/test_allocator.h @@ -80,11 +80,12 @@ {assert(data_ >= 0); --alloc_count; ::operator delete((void*)p);} size_type max_size() const throw() {return UINT_MAX / sizeof(T);} +#ifdef _LIBCPP_HAS_NO_RVALUE_REFERENCES void construct(pointer p, const T& val) {::new(p) T(val);} -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES - void construct(pointer p, T&& val) - {::new(p) T(std::move(val));} +#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES + template void construct(pointer p, U&& val) + {::new(p) T(std::forward(val));} #endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES void destroy(pointer p) {p->~T();} @@ -140,11 +141,12 @@ {assert(data_ >= 0); --alloc_count; ::operator delete((void*)p); } size_type max_size() const throw() {return UINT_MAX / sizeof(T);} +#ifdef _LIBCPP_HAS_NO_RVALUE_REFERENCES void construct(pointer p, const T& val) {::new(p) T(val);} -#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES - void construct(pointer p, T&& val) - {::new(p) T(std::move(val));} +#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES + template void construct(pointer p, U&& val) + {::new(p) T(std::forward(val));} #endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES void destroy(pointer p) {p->~T();}