#include "llvm/Support/thread.h"
+#ifdef _MSC_VER
+// concrt.h depends on eh.h for __uncaught_exception declaration
+// even if we disable exceptions.
+#include <eh.h>
+#endif
+
#include <condition_variable>
#include <functional>
#include <future>
template <typename Function, typename... Args>
inline std::shared_future<VoidTy> async(Function &&F, Args &&... ArgList) {
auto Task =
- std::bind(std::forward<Function>(F), std::forward<Args...>(ArgList...));
+ std::bind(std::forward<Function>(F), std::forward<Args>(ArgList)...);
#ifndef _MSC_VER
return asyncImpl(std::move(Task));
#else