pistache
pistache copied to clipboard
Big parameter passed by value (PASS_BY_VALUE)
pass_by_value: Passing parameter response of type Pistache::Http::ResponseWriter (size 704 bytes) by value. File: router.h Line: 365
@bradyguyer I'm not sure, but I think I cannot agree with you. In this casePistache::Http::ResponseWriter
object is passed by value using move semantics:
onRequest
[std::move(resp)
] -> route
[std::move(response)
] -> invokeHandler
[std::forward<Args>(args)...
] and as a result no copying here.
and also moved in lamdba: func(request, std::move(response));
that is bound as a handler.
You can go through these call and check.
Also copying of ResponseWriter
objects is prohibited:
ResponseWriter& operator=(const ResponseWriter& other) = delete;