folly/ApplyTuple.h: fix const-correctness & other issues, simplify
authorSven Over <over@fb.com>
Thu, 18 Feb 2016 13:31:22 +0000 (05:31 -0800)
committerfacebook-github-bot-4 <folly-bot@fb.com>
Thu, 18 Feb 2016 14:20:26 +0000 (06:20 -0800)
commitca09289d7cdd304e27e6a966681dd958891521e9
tree198d240fd27f5d101389536e46e2c2aff78855e3
parent72cab06fa9048a05aeec9d4881b100b230bcba74
folly/ApplyTuple.h: fix const-correctness & other issues, simplify

Summary:The existing implementation of folly::applyTuple does not support
mutable callables (such as mutable lambdas and other functor objects
that only implement non-const operator()).

This commit adds a few more unit tests and changes the implementation
so that new and existing tests pass.

Reviewed By: yfeldblum

Differential Revision: D2942622

fb-gh-sync-id: 82478f290e9fd2020358ff79ef0a6bcf8a43738c
shipit-source-id: 82478f290e9fd2020358ff79ef0a6bcf8a43738c
folly/ApplyTuple.h
folly/test/ApplyTupleTest.cpp