summaryrefslogtreecommitdiffhomepage
path: root/compat
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2016-11-29 05:40:30 +0100
committerStanislaw Halik <sthalik@misaki.pl>2016-11-29 05:42:23 +0100
commit1ab4751c9ac2d4e1dcc3b730f8dcf53500d728e5 (patch)
treeee656a165308267969fa10af5bbd4a14e2f85295 /compat
parent2e2ca6629b8c78165772ceedccfb38002beb0431 (diff)
compat/run-in-thread: fix on msvc 2017
Diffstat (limited to 'compat')
-rw-r--r--compat/run-in-thread.hpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/compat/run-in-thread.hpp b/compat/run-in-thread.hpp
index d377f625..c32c232d 100644
--- a/compat/run-in-thread.hpp
+++ b/compat/run-in-thread.hpp
@@ -6,7 +6,7 @@
#include <condition_variable>
#include <utility>
-namespace detail {
+namespace qt_impl_detail {
template<typename t>
struct run_in_thread_traits
@@ -25,14 +25,14 @@ struct run_in_thread_traits<void>
using ret_type = void;
static inline void assign(unsigned char&, unsigned char&&) {}
static inline void pass(type&&) {}
- template<typename F> static type&& call(F& fun) { fun(); return std::move(type(0)); }
+ template<typename F> static type call(F& fun) { fun(); return type(0); }
};
}
template<typename F>
auto run_in_thread_sync(QObject* obj, F&& fun)
- -> typename detail::run_in_thread_traits<decltype(std::forward<F>(fun)())>::ret_type
+ -> typename qt_impl_detail::run_in_thread_traits<decltype(std::forward<F>(fun)())>::ret_type
{
using lock_guard = std::unique_lock<std::mutex>;
@@ -42,7 +42,7 @@ auto run_in_thread_sync(QObject* obj, F&& fun)
std::thread::id waiting_thread = std::this_thread::get_id();
- using traits = detail::run_in_thread_traits<decltype(std::forward<F>(fun)())>;
+ using traits = qt_impl_detail::run_in_thread_traits<decltype(std::forward<F>(fun)())>;
typename traits::type ret;