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 // <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 "filesystem_include.hpp"
21 #include <type_traits>
22 #include <cassert>
23 
24 #include "test_macros.h"
25 
26 
main()27 int main() {
28   using namespace fs;
29   ASSERT_SAME_TYPE(path::value_type, char);
30   ASSERT_SAME_TYPE(path::string_type, std::basic_string<path::value_type>);
31   {
32     ASSERT_SAME_TYPE(const path::value_type, decltype(path::preferred_separator));
33     static_assert(path::preferred_separator == '/', "");
34     // Make preferred_separator ODR used by taking its address.
35     const char* dummy = &path::preferred_separator;
36     ((void)dummy);
37   }
38 }
39