]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/libs/filesystem/test/issues/6638-global-init-fails-3.cpp
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / boost / libs / filesystem / test / issues / 6638-global-init-fails-3.cpp
CommitLineData
7c673cae
FG
1#include <boost/filesystem.hpp>
2#include <boost/detail/lightweight_main.hpp>
3#include <string>
4
5using namespace boost::filesystem;
6
7// The original bug report was that this broke:
8// path p(L"C:\\TEMP\\");
9// path r(p / "narrow");
10// That code now works, but ...
11
92f5a8d4 12// Nils Gladitz has provided this example ...
7c673cae
FG
13
14class Test
15{
16public:
1e59de90
TL
17 ~Test()
18 {
19 path p(L"C:\\TEMP\\");
20 path r(p / "narrow");
21 }
7c673cae
FG
22};
23
24// path p("narrow");
25
26// fails if static linked and Test object is global variable, but does not fail if
27// path p("narrow") line above is not commented out, and also does not fail if the
28// Test test2 line below is commented out.
29
30Test test1;
31Test test2;
32
1e59de90 33int cpp_main(int, char*[])
7c673cae 34{
1e59de90 35 return 0;
7c673cae 36}