Split get_default() into two for deferred default construction
authorAaryaman Sagar <aary@instagram.com>
Mon, 20 Nov 2017 23:59:34 +0000 (15:59 -0800)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Tue, 21 Nov 2017 00:07:16 +0000 (16:07 -0800)
commitd4d49d6c7ab3bf9ae03b0154e0471bfb56e1c2de
treebc3a9fbbfef160032069e55c8a165aa36865c421
parentfe1ff9ef158019202de66685e787af1cd512b574
Split get_default() into two for deferred default construction

Summary:
As it stood currently folly::get_default() would unnecessarily
construct a value into the third parameter, which was unnecessary in the fast
path where the element was found in the map

Reviewed By: yfeldblum

Differential Revision: D6366352

fbshipit-source-id: db55b944ca63e565997094c11b90c4ebe98531ce
folly/MapUtil.h
folly/test/MapUtilTest.cpp