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

VS2022 deprecation warning for std::code_cvt and friends ... #424

Closed
g40 opened this issue Mar 18, 2024 · 3 comments
Closed

VS2022 deprecation warning for std::code_cvt and friends ... #424

g40 opened this issue Mar 18, 2024 · 3 comments

Comments

@g40
Copy link
Contributor

g40 commented Mar 18, 2024

This may have been reported before but I cannot see it. Can submit a PR which offers a Windows solution if desired.

Great resource. Thank you.

4>R:\src\apps\composer\libs\rtaudio\RtAudio.cpp(77,36): warning C4996: 'std::codecvt_utf8_utf16<wchar_t,1114111,(std::codecvt_mode)0>': warning STL4017: std::wbuffer_convert, std::wstring_convert, and the <codecvt> 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.
4>R:\vs2022\VC\Tools\MSVC\14.39.33519\include\codecvt(442,39):
4>see declaration of 'std::codecvt_utf8_utf16'
4>R:\src\apps\composer\libs\rtaudio\RtAudio.cpp(77,15): warning C4996: 'std::wstring_convert<std::codecvt_utf8_utf16<wchar_t,1114111,(std::codecvt_mode)0>,wchar_t,std::allocator<wchar_t>,std::allocator<char>>': warning STL4017: std::wbuffer_convert, std::wstring_convert, and the <codecvt> 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.
4>R:\vs2022\VC\Tools\MSVC\14.39.33519\include\xlocbuf(303,39):
4>see declaration of 'std::wstring_convert'
4>R:\src\apps\composer\libs\rtaudio\RtAudio.cpp(77,66): warning C4996: 'std::wstring_convert<std::codecvt_utf8_utf16<wchar_t,1114111,(std::codecvt_mode)0>,wchar_t,std::allocator<wchar_t>,std::allocator<char>>::to_bytes': warning STL4017: std::wbuffer_convert, std::wstring_convert, and the <codecvt> 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.
@garyscavone
Copy link
Contributor

I don't use VS so it would be helpful if you could submit a PR!

@g40
Copy link
Contributor Author

g40 commented Apr 6, 2024

Hello. Please find #426 for your comment/review.

@g40
Copy link
Contributor Author

g40 commented Apr 18, 2024

Merged so closing this one.

@g40 g40 closed this as completed Apr 18, 2024
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

No branches or pull requests

2 participants