No need for a wrapping structure for posixTimeToDuration
Summary: [Folly] No need for a wrapping structure for `posixTimeToDuration`. We can just use a variant of tag dispatch. In this variant, we pass to `posixTimeToDuration` a default-initialized value of the desired return type and we write overload templates for each possible variant. The argument is used purely for overload resolution and return type deduction, not for its runtime value. It is slightly different from tag dispatch because we do not use separate types which are purely tag types. Reviewed By: simpkins Differential Revision: D6371572 fbshipit-source-id: 1987dee31fceec8733caa61495e96489dbf1ca39
Showing
This diff is collapsed.
Please register or sign in to comment