constexpr estimateSpaceNeeded for string literals. v2017.10.16.00
authorAndrew Krieger <andrew.krieger@oculus.com>
Mon, 16 Oct 2017 04:30:56 +0000 (21:30 -0700)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Mon, 16 Oct 2017 04:36:02 +0000 (21:36 -0700)
commitb02d434889ac7e937aaf01b1e601c76aa119640e
treef2e3a6bee54da8d931f7aac41e1535911ffa3216
parent24a9e5fd0aa688ac3601ebf563209a77c2d8e913
constexpr estimateSpaceNeeded for string literals.

Summary:
Partially inspired by WillerZ's investigation into faster compiling
StringPiece work, I thought this would be an easy drop in that short
circuits some compilation logic (or possibly is strictly better, since the
StringPiece conversion method isn't constexpr).

Reviewed By: yfeldblum

Differential Revision: D6059537

fbshipit-source-id: 072f56e58aa47db10b54825cac8a05dc035b295c
folly/Conv.h