From 1ab4751c9ac2d4e1dcc3b730f8dcf53500d728e5 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Tue, 29 Nov 2016 05:40:30 +0100 Subject: compat/run-in-thread: fix on msvc 2017 --- compat/run-in-thread.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'compat') 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 #include -namespace detail { +namespace qt_impl_detail { template struct run_in_thread_traits @@ -25,14 +25,14 @@ struct run_in_thread_traits using ret_type = void; static inline void assign(unsigned char&, unsigned char&&) {} static inline void pass(type&&) {} - template static type&& call(F& fun) { fun(); return std::move(type(0)); } + template static type call(F& fun) { fun(); return type(0); } }; } template auto run_in_thread_sync(QObject* obj, F&& fun) - -> typename detail::run_in_thread_traits(fun)())>::ret_type + -> typename qt_impl_detail::run_in_thread_traits(fun)())>::ret_type { using lock_guard = std::unique_lock; @@ -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(fun)())>; + using traits = qt_impl_detail::run_in_thread_traits(fun)())>; typename traits::type ret; -- cgit v1.2.3