Fix folly::to<> under MSVC
authorChristopher Dykes <cdykes@fb.com>
Sun, 21 Aug 2016 17:02:29 +0000 (10:02 -0700)
committerFacebook Github Bot 0 <facebook-github-bot-0-bot@fb.com>
Sun, 21 Aug 2016 17:08:30 +0000 (10:08 -0700)
commit1675b8959037b2e0c038866c2e5fb60e0ef2e305
treec9071173f480a6726ad7e59046ae4f5989d0af07
parent10ed79f7b20aeb03e720cd9a01f43f5a5f15f021
Fix folly::to<> under MSVC

Summary: MSVC didn't like the conversion to using `Expected`, and, after `Expected` was fixed to work under MSVC, conv still needs more changes. Specifically MSVC doesn't understand the single-instantiation form of getting the last element, so we have to switch to a tuple-backed version instead, which requires more template instantions, but produces the same performance at runtime.

Reviewed By: ericniebler

Differential Revision: D3744063

fbshipit-source-id: affcab1574c721d8b9529784d7ca2a46233d9935
folly/Conv.h