MCPcopy Create free account
hub / github.com/boostorg/filesystem / main

Function main

example/tut5.cpp:15–52  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13namespace fs = boost::filesystem;
14
15int main()
16{
17 // \u263A is "Unicode WHITE SMILING FACE = have a nice day!"
18 std::string narrow_string ("smile2");
19 std::wstring wide_string (L"smile2\u263A");
20 std::list<char> narrow_list;
21 narrow_list.push_back('s');
22 narrow_list.push_back('m');
23 narrow_list.push_back('i');
24 narrow_list.push_back('l');
25 narrow_list.push_back('e');
26 narrow_list.push_back('3');
27 std::list<wchar_t> wide_list;
28 wide_list.push_back(L's');
29 wide_list.push_back(L'm');
30 wide_list.push_back(L'i');
31 wide_list.push_back(L'l');
32 wide_list.push_back(L'e');
33 wide_list.push_back(L'3');
34 wide_list.push_back(L'\u263A');
35
36 { fs::ofstream f("smile"); }
37 { fs::ofstream f(L"smile\u263A"); }
38 { fs::ofstream f(narrow_string); }
39 { fs::ofstream f(wide_string); }
40 { fs::ofstream f(narrow_list); }
41 { fs::ofstream f(wide_list); }
42 narrow_list.pop_back();
43 narrow_list.push_back('4');
44 wide_list.pop_back();
45 wide_list.pop_back();
46 wide_list.push_back(L'4');
47 wide_list.push_back(L'\u263A');
48 { fs::ofstream f(fs::path(narrow_list.begin(), narrow_list.end())); }
49 { fs::ofstream f(fs::path(wide_list.begin(), wide_list.end())); }
50
51 return 0;
52}

Callers

nothing calls this directly

Calls 3

beginMethod · 0.80
endMethod · 0.80
pathFunction · 0.50

Tested by

no test coverage detected