37 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++11, c++1410 11// <filesystem>12 13// class path;14// enum class format;15 16#include <filesystem>17#include <type_traits>18#include <cassert>19 20#include "test_macros.h"21namespace fs = std::filesystem;22 23int main(int, char**) {24 typedef fs::path::format E;25 static_assert(std::is_enum<E>::value, "");26 27 LIBCPP_STATIC_ASSERT(std::is_same<std::underlying_type<E>::type, unsigned char>::value, ""); // Implementation detail28 29 static_assert(30 E::auto_format != E::native_format &&31 E::auto_format != E::generic_format &&32 E::native_format != E::generic_format,33 "Expected enumeration values are not unique");34 35 return 0;36}37