1 //===----------------------------------------------------------------------===//
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
7 //===----------------------------------------------------------------------===//
11 // template<class T, T N>
12 // using make_integer_sequence = integer_sequence<T, 0, 1, ..., N-1>;
14 // UNSUPPORTED: c++03, c++11
16 // This test hangs during recursive template instantiation with libstdc++
17 // UNSUPPORTED: stdlib=libstdc++
21 #include "test_macros.h"
23 typedef std::make_integer_sequence
<int, -3> MakeSeqT
;
25 // std::make_integer_sequence is implemented using a compiler builtin if available.
26 // this builtin has different diagnostic messages than the fallback implementation.
27 #if TEST_HAS_BUILTIN(__make_integer_seq)
28 MakeSeqT i
; // expected-error@*:* {{integer sequences must have non-negative sequence length}}
30 MakeSeqT i
; // expected-error-re@*:* {{static assertion failed{{.*}}std::make_integer_sequence must have a non-negative sequence length}}