[PATCH] D11329: [libcxx] Add __invoke_constexpr functions. Try 2.
Eric Fiselier
eric at efcs.ca
Sat Jul 18 10:56:09 PDT 2015
EricWF created this revision.
EricWF added a reviewer: mclow.lists.
EricWF added a subscriber: cfe-commits.
This patch is an alternate approach to D9730
std::experimental::apply requires a constexpr implementation of INVOKE(...). Simply marking the current implementation of __invoke as constexpr will break existing code due to CWG issue #1581. For this reason we should add a separate function called __invoke_constexpr to be used where constexpr is required.
This patch adds a `__invoke_constexpr` function that mirrors `__invoke`.
I chose not to generate invoke functions using macros because of the amount of code that would have to be within a macro block. It also is likely to yield bad error messages.
This patch also re-enables constexpr support for std::experimental::apply.
Also See:
https://llvm.org/bugs/show_bug.cgi?id=23141
http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_active.html#1581
http://reviews.llvm.org/D11329
Files:
include/experimental/tuple
include/type_traits
test/std/experimental/utilities/tuple/tuple.apply/constexpr_types.pass.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D11329.30083.patch
Type: text/x-patch
Size: 8183 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150718/148e9f10/attachment.bin>
More information about the cfe-commits
mailing list