blob: a47ab2564a62136d279e728d6dac9f558ddf607d [file] [log] [blame]
Louis Dionnef7b43232019-03-19 19:27:29 +00001//===----------------------------------------------------------------------===//
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++98, c++03
10
11// <filesystem>
12
13// class path
14
15// typedef ... value_type;
16// typedef basic_string<value_type> string_type;
17// static constexpr value_type preferred_separator = ...;
18
Nico Webercc890632019-08-21 00:14:12 +000019#include "filesystem_include.h"
Louis Dionnef7b43232019-03-19 19:27:29 +000020#include <type_traits>
21#include <cassert>
22
23#include "test_macros.h"
24
25
26int main(int, char**) {
27 using namespace fs;
28 ASSERT_SAME_TYPE(path::value_type, char);
29 ASSERT_SAME_TYPE(path::string_type, std::basic_string<path::value_type>);
30 {
31 ASSERT_SAME_TYPE(const path::value_type, decltype(path::preferred_separator));
32 static_assert(path::preferred_separator == '/', "");
33 // Make preferred_separator ODR used by taking its address.
34 const char* dummy = &path::preferred_separator;
35 ((void)dummy);
36 }
37
38 return 0;
39}