parameter2 icon indicating copy to clipboard operation
parameter2 copied to clipboard

better arguement forwarding needed

Open odinthenerd opened this issue 9 years ago • 0 comments

We need to define the optimal method of passing parameters in to the args tuple. Here are the scenarios I have come up with so far:

  • if we assume that out parameters are wrapped by the user as std::ref's we need only convert them to a normal ref then indexed in the args tuple, other than that passing them around is trivial. Defaults are odd but in the case of a default constructed by a functor factory they are theoretically usefull.
  • if the user wants to pass an argument via cost ref arguement forwarding is trivial and we could just construct the default right in the args tuple in order for it to be referenced. This is probably not the most efficient approach though.
  • pass by value are just forwarded in, no surprises there, however we could be lazy in the generation of the defaults. Lazy generation could cause problems though if a constructor accesses outside state.

odinthenerd avatar Jun 06 '16 13:06 odinthenerd