//===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure // // This file is dual licensed under the MIT and the University of Illinois Open // Source Licenses. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // // template // class scoped_allocator_adaptor // void deallocate(pointer p, size_type n); #include #include #include "../allocators.h" int main() { #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef std::scoped_allocator_adaptor> A; A a; a.deallocate((int*)10, 20); assert((A1::deallocate_called == std::pair((int*)10, 20))); } { typedef std::scoped_allocator_adaptor, A2> A; A a; a.deallocate((int*)10, 20); assert((A1::deallocate_called == std::pair((int*)10, 20))); } { typedef std::scoped_allocator_adaptor, A2, A3> A; A a; a.deallocate((int*)10, 20); assert((A1::deallocate_called == std::pair((int*)10, 20))); } #endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES }