Reverted commit D3557832
authorEric Niebler <eniebler@fb.com>
Mon, 15 Aug 2016 22:08:57 +0000 (15:08 -0700)
committerFacebook Github Bot 0 <facebook-github-bot-0-bot@fb.com>
Mon, 15 Aug 2016 22:23:34 +0000 (15:23 -0700)
commitad2f228ab1359952d37acdc4f3032e1405cca221
tree8e111efa7e20cdc03417a91fd3e1aea30889f5b6
parent89cc32931877aa684e1a1f06776f564a49d39eab
Reverted commit D3557832

Summary:
This change adds a non-throwing interface for folly::to<T>: tryTo<T>, which
returns an Expected<T, ConversionCode>.

Here is how the non-throwing interface compares to the regular interface in
terms of performance. On the successful path, there's generally not much
difference between using the throwing and non-throwing interfaces. For the
error path, tryTo<> is about three orders of magnitude faster than to<>.

Reviewed By: mhx

Differential Revision: D3557832

fbshipit-source-id: 21f06b3c1a72b06dcf867ed3a3410f51e0fdaf45
folly/Conv.cpp
folly/Conv.h
folly/Portability.h
folly/String-inl.h
folly/String.h
folly/docs/Conv.md
folly/test/ConvBenchmark.cpp
folly/test/ConvTest.cpp
folly/test/StringTest.cpp
folly/test/TraitsTest.cpp