• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //===----------------------------------------------------------------------===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is dual licensed under the MIT and the University of Illinois Open
6 // Source Licenses. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 
10 // <utility>
11 
12 // template<class T, T... I>
13 // struct integer_sequence
14 // {
15 //     typedef T type;
16 //
17 //     static constexpr size_t size() noexcept;
18 // };
19 
20 // This test is a conforming extension.  The extension turns undefined behavior
21 //  into a compile-time error.
22 
23 #include <utility>
24 
25 #include "test_macros.h"
26 
main()27 int main()
28 {
29 #if TEST_STD_VER > 11
30 
31 //  Should fail to compile, since float is not an integral type
32     using floatmix = std::integer_sequence<float>;
33     floatmix::value_type I;
34 
35 #else
36 
37 X
38 
39 #endif  // TEST_STD_VER > 11
40 }
41