what is the meaning of percent symbol(%) and sharp symbol(#) in c++ template -
here code ms vc stl:
template<typename _fun_t, typename _arg_t> inline binder1st<_fun_t> bind1st(_fun_t% _func, _arg_t _left) { // return binder1st functor adapter typename _fun_t::first_argument_type _val = _left; return (binder1st<_fun_t>(_func, _val)); }
and qt:
#define q_arg(type, data) qargument<type >(#type, data)
neither of these specific templates.
the '%' microsoft extension c++, part of c++/cli. defines tracking reference. normal lvalue reference variable of type t&
reference variable; t%
except refers managed object might moved garbage collector; gc knows when moves objects has patch tracking references object.
'#' stringify operator of c preprocessor. means value of following macro argument, surrounded double quote marks. this:
q_arg(mytype, 12345)
will expand this:
qargument<mytype >("mytype", 12345);
Comments
Post a Comment