Ticket #6638: paths.cpp

File paths.cpp, 493 bytes (added by john doe <johndoe>, 11 years ago)
Line 
1// paths.cpp : Defines the entry point for the console application.
2//
3
4#include "stdafx.h"
5#include <iostream>
6#include <boost/filesystem.hpp>
7
8using namespace boost::filesystem;
9
10path p(L"C:\\TEMP\\");
11path q(p / L"wide"); // Works!
12path r(p / "narrow"); // Breaks :(
13
14int _tmain(int argc, _TCHAR* argv[])
15{
16 path p(L"C:\\TEMP\\");
17 path q(p / L"wide"); // Works!
18 path r(p / "narrow"); // Works here!
19
20 std::cout << r.string() << std::endl;
21 return 0;
22}