blob: 3ed0a8f199e4931dd52d2d79264638644bb0bb52 [file] [log] [blame]
Eric Fiselierc7979582016-06-17 19:46:40 +00001//===----------------------------------------------------------------------===//
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
Eric Fiselier19aae8f2018-03-26 05:46:57 +000020#include "filesystem_include.hpp"
Eric Fiselierc7979582016-06-17 19:46:40 +000021#include <type_traits>
22#include <cassert>
23
24#include "test_macros.h"
25
Eric Fiselierc7979582016-06-17 19:46:40 +000026
27int 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 == '/', "");
Stephan T. Lavaveja730ed32017-01-18 20:10:25 +000034 // Make preferred_separator ODR used by taking its address.
Eric Fiselierc7979582016-06-17 19:46:40 +000035 const char* dummy = &path::preferred_separator;
36 ((void)dummy);
37 }
38}