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

I am getting wstring_convert deprecated error. #96

Open
xpd54 opened this issue Apr 16, 2024 · 4 comments
Open

I am getting wstring_convert deprecated error. #96

xpd54 opened this issue Apr 16, 2024 · 4 comments

Comments

@xpd54
Copy link

xpd54 commented Apr 16, 2024

I am compiling on macOS (14.4.1) and getting error in encoding.cpp.
error: 'codecvt_utf8<wchar_t, 1114111, 0>' is deprecated [-Werror,-Wdeprecated-declarations]
std::wstring_convert<std::codecvt_utf8<wchar_t>> convert;

@xpd54
Copy link
Author

xpd54 commented Apr 17, 2024

If someone is getting the same error. (if you find a way please leave comment here)
At end I just ignored the deprecated error with GCC flag.
Error was coming in
modules/CppCommon/source/string/encoding.cpp

namespace CppCommon {
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"

/*
Whole implementation of encoding.cpp
*/

#pragma GCC diagnostic pop
} // namespace CppCommon

@nitko12
Copy link

nitko12 commented May 4, 2024

I've just faced the same problem.

Thank you for the workaround :)

@oxful
Copy link

oxful commented Oct 16, 2024

the problem still here...

/home/ec2-user/CppServer/modules/CppCommon/include/string/format.inl: In function ‘void CppCommon::print(fmt::v11::wformat_string<T ...>, T&& ...)’:
/home/ec2-user/CppServer/modules/CppCommon/include/string/format.inl:32:24: error: expected primary-expression before ‘wchar_t’
32 | return fmt::vprint<wchar_t>(pattern, fmt::make_format_argsfmt::wformat_context(args...));
| ^~~~~~~
/home/ec2-user/CppServer/modules/CppCommon/include/string/format.inl:32:24: error: expected ‘;’ before ‘wchar_t’
32 | return fmt::vprint<wchar_t>(pattern, fmt::make_format_argsfmt::wformat_context(args...));
| ^~~~~~~
| ;
/home/ec2-user/CppServer/modules/CppCommon/include/string/format.inl:32:31: error: expected unqualified-id before ‘>’ token

@xpd54
Copy link
Author

xpd54 commented Nov 12, 2024

@oxful CppServer uses CppCommon module which has fmt dependency.
👇 sent a PR.
chronoxor/CppCommon#35

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

3 participants