brintos

brintos / llvm-project-archived public Read only

0
0
Text · 900 B · 7575d3f Raw
34 lines · cpp
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-exception6//7//===----------------------------------------------------------------------===//8 9// UNSUPPORTED: c++03, c++1110 11// <utility>12 13// template<class T, T... I>14// struct integer_sequence15// {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 behavior22//  into a compile-time error.23 24#include <utility>25 26#include "test_macros.h"27 28int main(int, char**) {29    // Should fail to compile, since float is not an integral type30    using floatmix = std::integer_sequence<float>;31    floatmix::value_type I;32    return 0;33}34