[PATCH] D15421: [Feature] Add a builtin for indexing into parameter packs
Louis Dionne via cfe-commits
cfe-commits at lists.llvm.org
Thu Dec 10 09:32:55 PST 2015
ldionne created this revision.
ldionne added a reviewer: majnemer.
ldionne added a subscriber: cfe-commits.
This patch adds a `__nth_element` builtin that allows fetching the n-th type of a parameter pack with very little compile-time overhead. The patch was inspired by r252036 and r252115 by David Majnemer, which add a similar `__make_integer_seq` builtin for efficiently creating a `std::integer_sequence`.
http://reviews.llvm.org/D15421
Files:
include/clang/AST/ASTContext.h
include/clang/AST/DeclTemplate.h
include/clang/Basic/Builtins.h
include/clang/Basic/DiagnosticSemaKinds.td
include/clang/Serialization/ASTBitCodes.h
lib/AST/ASTContext.cpp
lib/AST/DeclTemplate.cpp
lib/Lex/PPMacroExpansion.cpp
lib/Sema/SemaLookup.cpp
lib/Sema/SemaTemplate.cpp
lib/Serialization/ASTReader.cpp
lib/Serialization/ASTWriter.cpp
test/PCH/nth-element.cpp
test/SemaCXX/nth_element.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D15421.42438.patch
Type: text/x-patch
Size: 15607 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20151210/cc47f0f6/attachment-0001.bin>
More information about the cfe-commits
mailing list