[RISCV] Fix mgather -> riscv.masked.strided.load combine not extending indices (...
[llvm-project.git] / libcxx / test / std / containers / sequences / deque / deque.cons / default_noexcept.pass.cpp
blob88672fa044fe21e983dc8e9d9588c8a51a5a58fd
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 // <deque>
11 // deque()
12 // noexcept(is_nothrow_default_constructible<allocator_type>::value);
14 // This tests a conforming extension
16 // UNSUPPORTED: c++03
18 #include <deque>
19 #include <cassert>
21 #include "test_macros.h"
22 #include "MoveOnly.h"
23 #include "test_allocator.h"
25 template <class T>
26 struct some_alloc
28 typedef T value_type;
29 some_alloc(const some_alloc&);
30 void allocate(std::size_t);
33 int main(int, char**)
35 #if defined(_LIBCPP_VERSION)
37 typedef std::deque<MoveOnly> C;
38 static_assert(std::is_nothrow_default_constructible<C>::value, "");
41 typedef std::deque<MoveOnly, test_allocator<MoveOnly>> C;
42 static_assert(std::is_nothrow_default_constructible<C>::value, "");
44 #endif // _LIBCPP_VERSION
46 typedef std::deque<MoveOnly, other_allocator<MoveOnly>> C;
47 static_assert(!std::is_nothrow_default_constructible<C>::value, "");
50 typedef std::deque<MoveOnly, some_alloc<MoveOnly>> C;
51 static_assert(!std::is_nothrow_default_constructible<C>::value, "");
54 return 0;