Last active
April 5, 2021 12:02
-
-
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)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #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