llvm/libcxx/test/std/language.support/support.types/byteops/enum_direct_init.pass.cpp

//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#include <cstddef>
#include <test_macros.h>

// UNSUPPORTED: c++03, c++11, c++14

int main(int, char**) {
  constexpr std::byte b{42};
  static_assert(std::to_integer<int>(b) == 42, "");

  return 0;
}