1 //===----------------------------------------------------------------------===//
3 // The LLVM Compiler Infrastructure
5 // This file is dual licensed under the MIT and the University of Illinois Open
6 // Source Licenses. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // UNSUPPORTED: c++98, c++03
14 // template <class OuterAlloc, class... InnerAllocs>
15 // class scoped_allocator_adaptor
17 // outer_allocator_type& outer_allocator();
18 // const outer_allocator_type& outer_allocator() const;
20 #include <scoped_allocator>
23 #include "allocators.h"
29 typedef std::scoped_allocator_adaptor<A1<int>> A;
31 assert(a.outer_allocator() == A1<int>(5));
34 typedef std::scoped_allocator_adaptor<A1<int>, A2<int>> A;
35 A a(A1<int>(5), A2<int>(6));
36 assert(a.outer_allocator() == A1<int>(5));
39 typedef std::scoped_allocator_adaptor<A1<int>, A2<int>, A3<int>> A;
40 A a(A1<int>(5), A2<int>(6), A3<int>(8));
41 assert(a.outer_allocator() == A1<int>(5));