$NetBSD: patch-src_rpc_command.h,v 1.3 2013/09/18 16:33:08 joerg Exp $ --- src/rpc/command.h.orig 2012-02-14 03:32:01.000000000 +0000 +++ src/rpc/command.h @@ -41,13 +41,17 @@ #include #include #include -#include #include #include // Move into config.h or something. -namespace tr1 { using namespace std::tr1; } +#if __cplusplus >= 201103L +using std::function; +#else +#include +using std::tr1::function; +#endif namespace core { class Download; @@ -111,7 +115,7 @@ typedef rt_triple tar class command_base; typedef const torrent::Object (*command_base_call_type)(command_base*, target_type, const torrent::Object&); -typedef tr1::function base_function; +typedef function base_function; template struct command_base_is_valid {}; template struct command_base_is_type {}; @@ -250,7 +254,7 @@ command_base::_call(command_base* cmd, t } #define COMMAND_BASE_TEMPLATE_TYPE(func_type, func_parm) \ - template ::proper_type> struct func_type { typedef tr1::function type; }; \ + template ::proper_type> struct func_type { typedef function type; }; \ \ template <> struct command_base_is_valid::type> { static const int value = 1; }; \ template <> struct command_base_is_valid::type> { static const int value = 1; }; \