brintos

brintos / llvm-project-archived public Read only

0
0
Text · 826 B · 6b8bc6c Raw
35 lines · cpp
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-exception6//7//===----------------------------------------------------------------------===//8 9// <deque>10 11// class deque12 13// allocator_type get_allocator() const14 15#include <deque>16#include <cassert>17 18#include "test_allocator.h"19#include "test_macros.h"20 21int main(int, char**) {22  {23    std::allocator<int> alloc;24    const std::deque<int> d(alloc);25    assert(d.get_allocator() == alloc);26  }27  {28    other_allocator<int> alloc(1);29    const std::deque<int, other_allocator<int> > d(alloc);30    assert(d.get_allocator() == alloc);31  }32 33  return 0;34}35