OSDN Git Service

thread.hpp
authormyun2 <myun2@nwhite.info>
Tue, 10 Jul 2012 07:07:15 +0000 (16:07 +0900)
committermyun2 <myun2@nwhite.info>
Tue, 10 Jul 2012 07:07:15 +0000 (16:07 +0900)
roast/include/roast/std/thread/thread.hpp

index 33eec9f..482604d 100644 (file)
@@ -86,14 +86,14 @@ namespace roast
                                thread_exception("thread start failed.");
                }
                
-#ifndef _ROAST_INVALID_TEMPLATE_OVERLOAD
+//#ifndef _ROAST_INVALID_TEMPLATE_OVERLOAD
                template <typename _Class, typename _Param, typename _Ret>
                thread_(_Class* p_this, _Ret (_Class::*func)(_Param), _Param param=0, void* opt=NULL)
                {
                        if ( start_class_ptr(p_this,func,param,opt) != true )
                                thread_exception("thread start failed.");
                }
-#endif
+//#endif
                virtual ~thread_()
                {
                        release();
@@ -119,13 +119,14 @@ namespace roast
                        return start_class(cls,param,opt);
                }
 
+               /*
                template <typename _Class, typename _Param>
                bool start(_Class *ptr, _Param param=0, void* opt=NULL)
                {
                        return start_class_ptr(ptr,param,opt);
                }
 
-               /*template <typename _Class, typename _Param, typename _Ret>
+               template <typename _Class, typename _Param, typename _Ret>
                bool start(_Ret (_Class::*func)(_Param), _Param param=0, void* opt=NULL)
                {
                        //  The second parameter is a class pointer or the method should be static.
@@ -173,6 +174,7 @@ namespace roast
                                return true;
                }
 
+               /*
                template <typename _Class, typename _Param>
                bool start_class_ptr(_Class *p_this, _Param param=0, void* opt=NULL)
                {
@@ -192,13 +194,14 @@ namespace roast
                        //  The second parameter is a class pointer or the method should be static.
                        The_second_parameter_is_a_class_pointer_or_the_method_should_be_static.
                }
+               */
 
                template <typename _Class, typename _Param, typename _Ret>
-               bool start_class_ptr(_Ret (_Class::*func)(_Param), _Class *ptr, _Param param=0, void* opt=NULL)
+               bool start_class_ptr(_Class *p_this, _Ret (_Class::*func)(_Param), _Param param=0, void* opt=NULL)
                {
                        m_handle = m_impl.start(
                                _thread_class_internal_callback<_Class>,
-                               (int)new _thread_start_class_info<_Class>(ptr, func, param, false),
+                               (int)new _thread_start_class_info<_Class>(p_this, func, param, false),
                                opt);
                        if ( m_handle == NULL )
                                return false;