Prevent IsOneOf unused template specialization instantiation
Summary: Current `IsOneOf` implementation does unnecessary work because it instantiates all of the possible template specializations, even if type is same as the first of the tested ones. E.g. `IsOneOf<char, char, int, float>` will instantiate: ``` IsOneOf<char, char, int, float> IsOneOf<char, char, int> IsOneOf<char, char> IsOneOf<char> ``` With the proposed inheritance, compiler will stop initializing at the first match. Closes https://github.com/facebook/folly/pull/643 Reviewed By: ericniebler Differential Revision: D5482783 Pulled By: yfeldblum fbshipit-source-id: 3d04c750ce72fa9b19b4d0588cccfb396a9e0715
Showing
Please register or sign in to comment