got rid of std::invoke to avoid C++17 dependence

master
Aaron 6 days ago
parent 178bd616f5
commit 9321846172

@ -16,7 +16,7 @@ builddir = "./build_mingw64"
doinstall = True #copies the build_output to the install dir when finished
cc = "x86_64-w64-mingw32-g++" #compiler
cflags = "-fPIC -O3 -std=c++17"
cflags = "-fPIC -O3"
libraries = "-l{}".format(libname)
libdirs = "-L{} -L{}/lib -L{}/lib".format(builddir,commondir,depdir)
linkerflags = "-static -static-libgcc -Wl,-rpath=."

@ -16,7 +16,7 @@ builddir = "./build_mingw64"
doinstall = False #copies the build_output to the install dir when finished
cc = "x86_64-w64-mingw32-g++" #compiler
cflags = "-fPIC -O3 -std=c++17"
cflags = "-fPIC -O3"
libraries = "-l{}".format(libname)
libdirs = "-L{} -L{}/lib -L{}/lib".format(builddir,commondir,depdir)
linkerflags = "-static -static-libgcc -Wl,-rpath=."

Binary file not shown.

@ -18,12 +18,16 @@ template<typename callable, typename ... argst> int threaded_execute(callable &&
{
nthreads = 1;
I = 0;
std::invoke(
std::forward<callable>(fptr),
I,
nthreads,
std::forward<argst>(args)...
);
// std::invoke(
// std::forward<callable>(fptr),
// I,
// nthreads,
// std::forward<argst>(args)...
// );
//std::invoke is a C++17 feature, and mingw8 complains even so.
// Can I get away with just calling the functions?
fptr(I,nthreads,std::forward<argst>(args)...);
}
else
{

Loading…
Cancel
Save