X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=resource%2Finclude%2FOCUtilities.h;h=87bdf355de5af8e0cb3ffdfc62e97bfba3b982fa;hb=17c68b2fd1e74586f85e552eeab4e32dc121f8a0;hp=65ea6afc2b5db8e9e9a0b5ddf4435ea52ee84b5d;hpb=8c01dff2c5bc5496f7dc1632c498943ec6ecb015;p=platform%2Fupstream%2Fiotivity.git diff --git a/resource/include/OCUtilities.h b/resource/include/OCUtilities.h index 65ea6af..87bdf35 100644 --- a/resource/include/OCUtilities.h +++ b/resource/include/OCUtilities.h @@ -78,8 +78,11 @@ namespace OC { throw OCException(OC::Exception::NIL_GUARD_NULL, OC_STACK_INVALID_PARAM); } - // Note that although parameters are being forwarded, std::bind() will make a single copy: - return std::bind(fn, p, std::forward(params)...)(); + // Note that the parameters are being passed by reference to std::bind. This is not an + // issue, as it is this function's parameters that are being passed by reference. So, + // unless the parameters are being passed by reference to here (or to checked_guard), + // they won't be modified. + return std::bind(fn, p, std::ref(params)...)(); } /* Check for nullptr and forward the result of an OC function call on success; raise