Skip to content

boost/filesystem.hpp warning c4244 (MSVC2019) #118

@klasing

Description

@klasing

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?
`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions