diff --git a/autowiring/auto_arg.h b/autowiring/auto_arg.h index a764b2af7..a45d16a09 100644 --- a/autowiring/auto_arg.h +++ b/autowiring/auto_arg.h @@ -83,6 +83,29 @@ class auto_arg> } }; +/// +/// Specialization for "T*" ~ auto_in. T must be const-qualified in order to be an input parameter. +/// +template +class auto_arg +{ +public: + static_assert(std::is_const::value, "Pointer-typed input parameters must point to a const-qualified type (T must be const-qualified)"); + typedef T* type; + typedef T* arg_type; + typedef auto_id id_type; + static const bool is_input = true; + static const bool is_output = false; + static const bool is_shared = false; + static const bool is_multi = false; + static const int tshift = 0; + + template + static const T* arg(C& packet) { + return packet.template Get(); + } +}; + /// /// Specialization for equivalent T auto_in ///