This patch adds the <experimental/tuple> header (almost) as specified in the latest draft of the library fundamentals TS.
The main changes in this patch are:
- Added variable template tuple_size_v
- Added function apply(Func &&, Tuple &&).
- Changed __invoke to be _LIBCPP_CONSTEXPR_AFTER_CXX11.
The apply(...) implementation uses __invoke to invoke the given function. __invoke already provides the required functionality. Using __invoke also allows apply to be used on pointers to member function/objects as an extension. In order to facilitate this __invoke has to be marked constexpr.
cppreference.com says: