2 //===----------------------------------------------------------------------===//
4 // The LLVM Compiler Infrastructure
6 // This file is dual licensed under the MIT and the University of Illinois Open
7 // Source Licenses. See LICENSE.TXT for details.
9 //===----------------------------------------------------------------------===//
11 // UNSUPPORTED: c++98, c++03
13 // <experimental/filesystem>
17 // const value_type* c_str() const noexcept;
19 #include <experimental/filesystem>
20 #include <type_traits>
23 #include "test_macros.h"
24 #include "filesystem_test_helper.hpp"
26 namespace fs = std::experimental::filesystem;
31 const char* const value = "hello world";
32 const std::string str_value = value;
35 ASSERT_SAME_TYPE(path::value_type const*, decltype(p.c_str()));
36 ASSERT_NOEXCEPT(p.c_str());
40 assert(p.c_str() == str_value);
41 assert(p.native().c_str() == p.c_str());