OSDN Git Service

こうしないと、パラメータ一個引数上手くいかないのでしょうか・・・
authormyun2 <myun2@nwhite.info>
Sun, 9 Sep 2012 06:43:06 +0000 (15:43 +0900)
committermyun2 <myun2@nwhite.info>
Sun, 9 Sep 2012 06:43:06 +0000 (15:43 +0900)
roast/include/roast/multitask/thread/thread.hpp
roast/test/socket_test/socket_server_test.cpp
roast/test/socket_test/socket_test.vcproj
roast/test/thread_test/thread_test.cpp

index b70e9db..34c1a13 100644 (file)
@@ -87,6 +87,14 @@ namespace roast
                        if ( start(func,param,opt) != true )
                                thread_exception("thread start failed.");
                }*/
+               thread_(thread_& th){}  //      TODO
+
+               template <typename _Func>
+               thread_(_Func func)
+               {
+                       thread_(func, 0);
+               }
+
                template <typename _Func, typename _Param>
                thread_(_Func func, _Param param=0, void* opt=NULL)
                {
index 2e74ae8..1bc3648 100644 (file)
@@ -1,6 +1,8 @@
 #include "roast/net/socket.hpp"
 
-void main( void )
+int main( void )
 {
+
+       return 0;
 }
 
index ea2a3d5..6f42731 100644 (file)
                        UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
                        >
                        <File
-                               RelativePath=".\socket_test.cpp"
+                               RelativePath=".\socket_server_test.cpp"
                                >
                        </File>
                </Filter>
index adf62f5..1d07598 100644 (file)
@@ -1,6 +1,14 @@
+#include <stdio.h>
 #include "roast/thread.hpp"
 
+int func(int)
+{
+       printf("thread.\n");
+       return 0;
+}
+
 int main()
 {
+       roast::thread th(func);
        return 0;
 }