Don't try and instantiate an invalid function in DiscriminatedPtrDetail
authorChristopher Dykes <cdykes@fb.com>
Fri, 1 Jul 2016 01:09:29 +0000 (18:09 -0700)
committerFacebook Github Bot 8 <facebook-github-bot-8-bot@fb.com>
Fri, 1 Jul 2016 01:24:13 +0000 (18:24 -0700)
commit788ab800753936d3e2aae211b9fcb5bc6109421d
treefdcde186eb4b079edd521a5b18181c4ebeb2ee8b
parentb0883076d53317c310f0ae453555f177d4c65b84
Don't try and instantiate an invalid function in DiscriminatedPtrDetail

Summary:
THe issue is quite simple: Regardless of the control flow, the previous implementation of this was instantiating `ApplyVisitor1<V,R>` which declares a return type, but never returns.
This refactors `ApplyVisitor1` and `ApplyConstVisitor1` so that the part of the control flow that was previously never reached simply doesn't exist anymore.

Reviewed By: yfeldblum

Differential Revision: D3479584

fbshipit-source-id: 605a48e39bba6dc14df1af1e76b55ea60f3e69d5
folly/detail/DiscriminatedPtrDetail.h