Skip to content

Instantly share code, notes, and snippets.

@GTANAdam
Last active April 5, 2021 12:02
Show Gist options
  • Select an option

  • Save GTANAdam/cad3a75926e93391a6b778370bf8abe9 to your computer and use it in GitHub Desktop.

Select an option

Save GTANAdam/cad3a75926e93391a6b778370bf8abe9 to your computer and use it in GitHub Desktop.
GNU std::thread & Callable object, pass functions without having to use functionals and binds (drop-in replacement), seems to fix a bug in Visual Studio with WSL2 (musl)
#pragma once
#include <thread>
namespace std_ex {
template <typename Callable, typename... Args>
std::thread thread(Callable&& f, Args&& ... args) {
return std::thread(f, args...);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment