dougbinks / enkiTS

A permissively licensed C and C++ Task Scheduler for creating parallel programs. Requires C++11 support.
zlib License
1.66k stars 138 forks source link

Compile warnings related to std::is_pod #70

Closed debaetsd closed 2 years ago

debaetsd commented 2 years ago

Updating to the latest version is giving me a bunch of errors when compiling using the latest version of Visual Studio 2022 and /std:c++latest . Not sure if this is related to the latest version though (I might just be the first one to try it :) )

<snip>\External\enkiTS\TaskScheduler.cpp(1053,1): error C4996: 'std::is_pod<T>': warning STL4025: std::is_pod and std::is_pod_v are deprecated in C++20. The std::is_trivially_copyable and/or std::is_standard_layout traits likely suit your use case. You can define _SILENCE_CXX20_IS_POD_DEPRECATION_WARNING or _SILENCE_ALL_CXX20_DEPRECATION_WARNINGS to acknowledge that you have received this warning.
1>        with
1>        [
1>            T=enki::TaskPipe
1>        ]
1>C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.30.30705\include\type_traits(481,1): message : see declaration of 'std::is_pod'

There are a bunch more of these, all with different template arguments (TaskPipe, PinnedTaskList, ...). I just added that _SILENCE_CXX20_IS_POD_DEPRECATION_WARNING to my build pipeline. Probably easy to resolve (though might require some preprocessor elbow grease to please different versions/compilers/... ? )

Thanks for this great library !

dougbinks commented 2 years ago

Thanks for the issue and comment :)

The library isn't currently up to date with C++20, but I'll take a look at moving to a C++11 and C++20 compatible alternative.

dougbinks commented 2 years ago

I've pushed a potential fix to the dev branch.