[mlir][scf]: Add value bound between scf for loop yield and result (#123200)
[llvm-project.git] / libcxx / test / std / containers / sequences / list / get_allocator.pass.cpp
blob895fc219086a89910f97cd0eb15f1889d2c9d51e
1 //===----------------------------------------------------------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
9 // <list>
11 // class list
13 // allocator_type get_allocator() const
15 #include <list>
16 #include <cassert>
18 #include "test_allocator.h"
19 #include "test_macros.h"
21 int main(int, char**) {
23 std::allocator<int> alloc;
24 const std::list<int> l(alloc);
25 assert(l.get_allocator() == alloc);
28 other_allocator<int> alloc(1);
29 const std::list<int, other_allocator<int> > l(alloc);
30 assert(l.get_allocator() == alloc);
33 return 0;