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 | //===----------------------------------------------------------------------===// |
8 | |
9 | // UNSUPPORTED: c++03, c++11 |
10 | |
11 | // <utility> |
12 | |
13 | // template<class T, T... I> |
14 | // struct integer_sequence |
15 | // { |
16 | // typedef T type; |
17 | // |
18 | // static constexpr size_t size() noexcept; |
19 | // }; |
20 | |
21 | // This test is a conforming extension. The extension turns undefined behavior |
22 | // into a compile-time error. |
23 | |
24 | #include <utility> |
25 | |
26 | #include "test_macros.h" |
27 | |
28 | int main(int, char**) { |
29 | // Should fail to compile, since float is not an integral type |
30 | using floatmix = std::integer_sequence<float>; |
31 | floatmix::value_type I; |
32 | return 0; |
33 | } |
34 | |