Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ported the Qt port to Cpp17 #153

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
Open

Conversation

towel42-com
Copy link

Created a new directory for Cpp17.
Removed all references to qt
Added CMakeLists.txt for both the library and the test application
Added support for gtest

Added a utils file for Qt'esq functions the STL is missing

For gtest support
cmake -DUSE_GTEST=ON
The default is off.

return 0;
} else if (text.empty()) {
// Nothing to match.
return -1;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warning C4245 'return': conversion from 'int' to 'size_t', signed/unsigned mismatch

Maybe use return std::wstring::npos; instead?

There are more occurences in this file, see lines 1874, 1877, 1879, 1885, 1895, 2059

// WTF?
throw std::wstring(std::wstring(L"Invalid patch mode '") + sign +
std::wstring(L" in: ") + line);
return {};

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unreachable code


static_assert(sizeof(wchar_t) <= 4, "wchar_t is greater that 32 bit");

std::wstring_convert<std::codecvt_utf8<wchar_t> > utf8_conv;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'std::codecvt_utf8<wchar_t,1114111,(std::codecvt_mode)0>': warning STL4017: std::wbuffer_convert, std::wstring_convert, and the header (containing std::codecvt_mode, std::codecvt_utf8, std::codecvt_utf16, and std::codecvt_utf8_utf16) are deprecated in C++17. (The std::codecvt class template is NOT deprecated.) The C++ Standard doesn't provide equivalent non-deprecated functionality; consider using MultiByteToWideChar() and WideCharToMultiByte() from <Windows.h> instead. You can define _SILENCE_CXX17_CODECVT_HEADER_DEPRECATION_WARNING or _SILENCE_ALL_CXX17_DEPRECATION_WARNINGS to suppress this warning.

Same in line 120

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants