File tree Expand file tree Collapse file tree 3 files changed +12
-0
lines changed
Expand file tree Collapse file tree 3 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -242,7 +242,11 @@ void ofstream::close()
242242}
243243#else // __GLIBCXX__
244244
245+ #if BOOST_VERSION >= 107700
246+ static_assert (sizeof (*BOOST_FILESYSTEM_C_STR (fs::path())) == sizeof(wchar_t ),
247+ #else
245248static_assert (sizeof (*fs::path ().BOOST_FILESYSTEM_C_STR) == sizeof(wchar_t ),
249+ #endif // BOOST_VERSION >= 107700
246250 " Warning: This build is using boost::filesystem ofstream and ifstream "
247251 " implementations which will fail to open paths containing multibyte "
248252 " characters. You should delete this static_assert to ignore this warning, "
Original file line number Diff line number Diff line change @@ -25,7 +25,11 @@ BOOST_AUTO_TEST_CASE(getwalletenv_file)
2525 std::string test_name = " test_name.dat" ;
2626 const fs::path datadir = gArgs .GetDataDirNet ();
2727 fs::path file_path = datadir / test_name;
28+ #if BOOST_VERSION >= 107700
29+ std::ofstream f (BOOST_FILESYSTEM_C_STR (file_path));
30+ #else
2831 std::ofstream f (file_path.BOOST_FILESYSTEM_C_STR );
32+ #endif // BOOST_VERSION >= 107700
2933 f.close ();
3034
3135 std::string filename;
Original file line number Diff line number Diff line change @@ -32,7 +32,11 @@ InitWalletDirTestingSetup::InitWalletDirTestingSetup(const std::string& chainNam
3232 fs::create_directories (m_walletdir_path_cases[" default" ]);
3333 fs::create_directories (m_walletdir_path_cases[" custom" ]);
3434 fs::create_directories (m_walletdir_path_cases[" relative" ]);
35+ #if BOOST_VERSION >= 107700
36+ std::ofstream f (BOOST_FILESYSTEM_C_STR (m_walletdir_path_cases[" file" ]));
37+ #else
3538 std::ofstream f (m_walletdir_path_cases[" file" ].BOOST_FILESYSTEM_C_STR );
39+ #endif // BOOST_VERSION >= 107700
3640 f.close ();
3741}
3842
You can’t perform that action at this time.
0 commit comments