Improve efficiency of trivial toDelim calls
authorPhil Willoughby <philwill@fb.com>
Mon, 26 Jun 2017 14:08:25 +0000 (07:08 -0700)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Mon, 26 Jun 2017 14:23:02 +0000 (07:23 -0700)
commit2e7df7eb8df4df4e7dd7c2bc641c64b78405ecf4
tree32004ae8c8c90fe5df340e1b5fab39f9a2e25e8f
parentcf8a8e02cbc96a06cf4290d03f3e5012610f128d
Improve efficiency of trivial toDelim calls

Summary:
`toDelim` with a single parameter of the same type as the target type was
previously copy-constructing its result. It will now construct it with perfect
forwarding which is more efficient if the input is a temporary.

This brings `toDelim` into line with the similar implementations of `to` and
`tryTo`

Reviewed By: yfeldblum

Differential Revision: D5301427

fbshipit-source-id: 843a2d93384de88cce42f26da6562a1a6ed0dc9c
folly/Conv.h