34 #ifndef SC_DYNAMIC_PROCESSES_H 35 #define SC_DYNAMIC_PROCESSES_H 42 #if SC_CPLUSPLUS >= 201103L // C++11 or later has std::bind 43 # include <functional> 45 namespace sc_unnamed {
46 using namespace std::placeholders;
51 template<
typename F,
typename... Args>
52 auto sc_bind( F&& f, Args&&... args )
53 # if SC_CPLUSPLUS < 201402L // explicit return type needed before C++14 54 -> decltype( std::bind(std::forward<F>(f), std::forward<Args>(args)...) )
56 {
return std::bind( std::forward<F>(f), std::forward<Args>(args)... ); }
60 # if SC_CPLUSPLUS < 201402L // explicit return type needed before C++14 61 -> decltype( std::ref(std::forward<T>(v) ) )
63 {
return std::ref( std::forward<T>(v) ); }
67 # if SC_CPLUSPLUS < 201402L // explicit return type needed before C++14 68 -> decltype( std::cref(std::forward<T>(v) ) )
70 {
return std::cref( std::forward<T>(v) ); }
76 #if ! (defined(SC_BIND_IN_GLOBAL_NAMESPACE) && SC_BIND_IN_GLOBAL_NAMESPACE == 0) 80 #endif // SC_BIND_IN_GLOBAL_NAMESPACE 82 #else // use Boost implementation 83 # include "sysc/packages/boost/bind.hpp" 84 # include "sysc/packages/boost/ref.hpp" 86 # define sc_bind sc_boost::bind 87 # define sc_ref(r) sc_boost::ref(r) 88 # define sc_cref(r) sc_boost::cref(r) 90 #endif // C++11 implementation 121 #endif // SC_DYNAMIC_PROCESSES_H
Process spawning support.
Join Process Synchronization Definition.