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 // UNSUPPORTED: c++98, c++03 11 12 // <experimental/filesystem> 13 14 // class path 15 16 // typedef ... value_type; 17 // typedef basic_string<value_type> string_type; 18 // static constexpr value_type preferred_separator = ...; 19 20 #include <experimental/filesystem> 21 #include <type_traits> 22 #include <cassert> 23 24 #include "test_macros.h" 25 26 namespace fs = std::experimental::filesystem; 27 main()28int main() { 29 using namespace fs; 30 ASSERT_SAME_TYPE(path::value_type, char); 31 ASSERT_SAME_TYPE(path::string_type, std::basic_string<path::value_type>); 32 { 33 ASSERT_SAME_TYPE(const path::value_type, decltype(path::preferred_separator)); 34 static_assert(path::preferred_separator == '/', ""); 35 // Make preferred_separator ODR used by taking its address. 36 const char* dummy = &path::preferred_separator; 37 ((void)dummy); 38 } 39 } 40