ELF: Have __rela_iplt_{start,end} surround .rela.iplt with --pack-dyn-relocs=android.
[llvm-project.git] / libcxx / test / std / utilities / intseq / intseq.intseq / integer_seq.pass.cpp
blobffd212f66b19bb30c20a8b2698b0d8f51c5a90f3
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 // UNSUPPORTED: c++03, c++11
10 // <utility>
12 // template<class T, T... I>
13 // struct integer_sequence
14 // {
15 // typedef T type;
17 // static constexpr size_t size() noexcept;
18 // };
20 #include <utility>
21 #include <type_traits>
22 #include <cstddef>
23 #include <cassert>
25 #include "test_macros.h"
27 int main(int, char**)
29 // Make a few of sequences
30 using int3 = std::integer_sequence<int, 3, 2, 1>;
31 using size1 = std::integer_sequence<std::size_t, 7>;
32 using ushort2 = std::integer_sequence<unsigned short, 4, 6>;
33 using bool0 = std::integer_sequence<bool>;
35 // Make sure they're what we expect
36 static_assert ( std::is_same<int3::value_type, int>::value, "int3 type wrong" );
37 static_assert ( int3::size() == 3, "int3 size wrong" );
39 static_assert ( std::is_same<size1::value_type, std::size_t>::value, "size1 type wrong" );
40 static_assert ( size1::size() == 1, "size1 size wrong" );
42 static_assert ( std::is_same<ushort2::value_type, unsigned short>::value, "ushort2 type wrong" );
43 static_assert ( ushort2::size() == 2, "ushort2 size wrong" );
45 static_assert ( std::is_same<bool0::value_type, bool>::value, "bool0 type wrong" );
46 static_assert ( bool0::size() == 0, "bool0 size wrong" );
48 return 0;