Hello,
wxWidgets pre-built binaries for mingw-w64 use win32 threading model and sjlj exception handling, and that is for compatibility and also wxWidgets is not using c++11 yet.
This configuration suits me too, but one problem is left, std::thread is not present yet in mingw-w64 win32, though they have said it will be available in the recent releases.
I don't want to use the posix version of mingw-w64 because I don't want the libwinpthread-1.dll alongside with my standalone exe app if it is statically linked with wxWidgets. Because libwinpthread never gets linked statically.
Then I have found this header only library for c++11 missing features in the mingw-w64 win32 model:
https://github.com/meganz/mingw-std-threads
I was wondering if anyone have tried it before, and if it is mature enough to use in production mode.
TIA.
Have anyone tried the meganz mingw-std-threads C++11 std::thread for mingw-w64 win32 for production without issues?
Re: Have anyone tried the meganz mingw-std-threads C++11 std::thread for mingw-w64 win32 for production without issues?
Hi,
While wxWidgets is not using C++11, no one prevents you from using C++11 in your own code. I'm doing that and I don't have any issues.
You will need to compile wxWidgets in C++11 mode. but that''s about it. And it is only to keep the same exact options to the compiler.
Just use std::thread unless you need to maintain an old code.
Other than that - it is encouraged to use std::string, std::thread and all other recent standard features.
Now - some people use/compile both even in C++20 mode.
I hope this answer you question.
Thank you.
While wxWidgets is not using C++11, no one prevents you from using C++11 in your own code. I'm doing that and I don't have any issues.
You will need to compile wxWidgets in C++11 mode. but that''s about it. And it is only to keep the same exact options to the compiler.
Just use std::thread unless you need to maintain an old code.
Other than that - it is encouraged to use std::string, std::thread and all other recent standard features.
Now - some people use/compile both even in C++20 mode.
I hope this answer you question.
Thank you.