added a move contructor to ThreadC

This commit is contained in:
hyung-hwan 2018-01-29 05:01:47 +00:00
parent c274cc0fb4
commit 57201a2af3
2 changed files with 5 additions and 3 deletions

View File

@ -34,7 +34,7 @@
#include <qse/types.h>
#include <qse/macros.h>
#if (__cplusplus >= 201103L) // C++11
#if (__cplusplus >= 201103L) || (defined(_MSC_VER) && _MSC_VER >= 1900) // C++11 or later
#define QSE_CPP_NOEXCEPT noexcept(true)
#define QSE_CPP_EXPLICIT explicit

View File

@ -118,8 +118,10 @@ class ThreadC: public Thread
{
public:
ThreadC () {}
ThreadC (F& f): __lfunc(f) { }
//ThreadC (F&& f): __lfunc(QSE_CPP_RVREF(f)) { }
ThreadC (const F& f): __lfunc(f) {}
#if defined(QSE_CPP_ENABLE_CPP11_MOVE)
ThreadC (F&& f): __lfunc(QSE_CPP_RVREF(f)) {}
#endif
static int call_func (qse_thr_t* thr, void* ctx)
{