]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - test/std/language.support/support.types/byteops/rshift.fail.cpp
Vendor import of libc++ trunk r351319 (just before the release_80
[FreeBSD/FreeBSD.git] / test / std / language.support / support.types / byteops / rshift.fail.cpp
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 #include <cstddef>
11 #include <test_macros.h>
12
13 // UNSUPPORTED: c++98, c++03, c++11, c++14
14
15 // template <class IntegerType>
16 //    constexpr byte operator >>(byte b, IntegerType shift) noexcept;
17 // These functions shall not participate in overload resolution unless
18 //   is_integral_v<IntegerType> is true.
19
20 int main () {
21     constexpr std::byte b1{static_cast<std::byte>(1)};
22     constexpr std::byte b2 = b1 >> 2.0f;
23 }