1 //===----------------------------------------------------------------------===//
3 // The LLVM Compiler Infrastructure
5 // This file is dual licensed under the MIT and the University of Illinois Open
6 // Source Licenses. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // UNSUPPORTED: c++98, c++03
12 // <experimental/filesystem>
16 // template <class charT, class traits>
17 // basic_ostream<charT, traits>&
18 // operator<<(basic_ostream<charT, traits>& os, const path& p);
20 // template <class charT, class traits>
21 // basic_istream<charT, traits>&
22 // operator>>(basic_istream<charT, traits>& is, path& p)
25 #include <experimental/filesystem>
26 #include <type_traits>
30 #include "test_macros.h"
31 #include "test_iterators.h"
32 #include "count_new.hpp"
33 #include "filesystem_test_helper.hpp"
35 MultiStringType InStr = MKSTR("abcdefg/\"hijklmnop\"/qrstuvwxyz/123456789");
36 MultiStringType OutStr = MKSTR("\"abcdefg/\\\"hijklmnop\\\"/qrstuvwxyz/123456789\"");
38 template <class CharT>
41 using Ptr = const CharT*;
42 using StrStream = std::basic_stringstream<CharT>;
44 const path p((const char*)InStr);
47 auto& ret = (ss << p);
48 assert(ss.str() == E);
53 auto& ret = ss >> p_in;
54 assert(p_in.native() == (const char*)InStr);
63 //doIOTest<char16_t>();
64 //doIOTest<char32_t>();