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 // template <class Source> 15 // path u8path(Source const&); 16 // template <class InputIter> 17 // path u8path(InputIter, InputIter); 18 19 #include "filesystem_include.hpp" 20 #include <type_traits> 21 #include <cassert> 22 23 #include "test_macros.h" 24 #include "test_iterators.h" 25 #include "count_new.hpp" 26 #include "filesystem_test_helper.hpp" 27 28 main()29int main() 30 { 31 using namespace fs; 32 const char* In1 = "abcd/efg"; 33 const std::string In2(In1); 34 const auto In3 = In2.begin(); 35 const auto In3End = In2.end(); 36 { 37 path p = fs::u8path(In1); 38 assert(p == In1); 39 } 40 { 41 path p = fs::u8path(In2); 42 assert(p == In1); 43 } 44 { 45 path p = fs::u8path(In3); 46 assert(p == In1); 47 } 48 { 49 path p = fs::u8path(In3, In3End); 50 assert(p == In1); 51 } 52 } 53