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