-
Notifications
You must be signed in to change notification settings - Fork 167
Description
Inside a C++ class I created the following member function.
VOID write_logfile(const tuple_logging& tl) { // write tuple to file wofs.open(p, std::ios_base::app); // results in a compiler warning: // warning C4244: ... // TODO: get rid of this warning wofs << boost::tuples::set_delimiter(L'#') << tl << L'\n'; wofs.close(); }
The relevant member variables are:
boost::filesystem::wofstream wofs;
The tuple, named tl, is constructed with std::wstring elements
The relevant includes are:
#include <boost/filesystem.hpp> #include <boost/tuple/tuple.hpp> #include <boost/tuple/tuple_io.hpp>
The compiler inside the MSVC2019 IDE gives me the following warning.
warning C4244: 'argument': conversion from 'const CharType' to 'const char', possible loss of data
(and a lot more of this stuff) On the following statement.
wofs << boost::tuples::set_delimiter(L'#') << tl << L'\n';
Can someone help me to get rid of this warning?
`