//===----------------------------------------------------------------------===// // // 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 // inner_allocator_type& inner_allocator(); // const inner_allocator_type& inner_allocator() const; #include #include #include "allocators.h" int main() { #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES { typedef std::scoped_allocator_adaptor> A; A a(A1(5)); assert(a.inner_allocator() == a); } { typedef std::scoped_allocator_adaptor, A2> A; A a(A1(5), A2(6)); assert(a.inner_allocator() == std::scoped_allocator_adaptor>(A2(6))); } { typedef std::scoped_allocator_adaptor, A2, A3> A; A a(A1(5), A2(6), A3(8)); assert((a.inner_allocator() == std::scoped_allocator_adaptor, A3>(A2(6), A3(8)))); } #endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES }