15a83710eSEric Fiselier //===----------------------------------------------------------------------===// 25a83710eSEric Fiselier // 357b08b09SChandler Carruth // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 457b08b09SChandler Carruth // See https://llvm.org/LICENSE.txt for license information. 557b08b09SChandler Carruth // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 65a83710eSEric Fiselier // 75a83710eSEric Fiselier //===----------------------------------------------------------------------===// 85a83710eSEric Fiselier 95a83710eSEric Fiselier // <deque> 105a83710eSEric Fiselier 115a83710eSEric Fiselier // explicit deque(const allocator_type& a); 125a83710eSEric Fiselier 135a83710eSEric Fiselier #include <deque> 145a83710eSEric Fiselier #include <cassert> 155a83710eSEric Fiselier 16*7fc6a556SMarshall Clow #include "test_macros.h" 175a83710eSEric Fiselier #include "test_allocator.h" 185a83710eSEric Fiselier #include "../../../NotConstructible.h" 195a83710eSEric Fiselier #include "min_allocator.h" 205a83710eSEric Fiselier 215a83710eSEric Fiselier template <class T, class Allocator> 225a83710eSEric Fiselier void test(const Allocator & a)235a83710eSEric Fiseliertest(const Allocator& a) 245a83710eSEric Fiselier { 255a83710eSEric Fiselier std::deque<T, Allocator> d(a); 265a83710eSEric Fiselier assert(d.size() == 0); 275a83710eSEric Fiselier assert(d.get_allocator() == a); 285a83710eSEric Fiselier } 295a83710eSEric Fiselier main(int,char **)302df59c50SJF Bastienint main(int, char**) 315a83710eSEric Fiselier { 325a83710eSEric Fiselier test<int>(std::allocator<int>()); 335a83710eSEric Fiselier test<NotConstructible>(test_allocator<NotConstructible>(3)); 34f2f2a639SEric Fiselier #if TEST_STD_VER >= 11 355a83710eSEric Fiselier test<int>(min_allocator<int>()); 365a83710eSEric Fiselier test<NotConstructible>(min_allocator<NotConstructible>{}); 372a10c960SMarshall Clow test<int>(explicit_allocator<int>()); 382a10c960SMarshall Clow test<NotConstructible>(explicit_allocator<NotConstructible>{}); 395a83710eSEric Fiselier #endif 402df59c50SJF Bastien 412df59c50SJF Bastien return 0; 425a83710eSEric Fiselier } 43