summaryrefslogtreecommitdiffstats
path: root/clang/test/CXX/temp/temp.decls/temp.variadic/metafunctions.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Reject varargs '...' in function prototype if there are more parameters afterRichard Smith2014-08-111-1/+1
| | | | | | | | | | | it. Diagnose with recovery if it appears after a function parameter that was obviously supposed to be a parameter pack. Otherwise, warn if it immediately follows a function parameter pack, because the user most likely didn't intend to write a parameter pack followed by a C-style varargs ellipsis. This warning can be syntactically disabled by using ", ..." instead of "...". llvm-svn: 215408
* Update all tests other than Driver/std.cpp to use -std=c++11 rather thanRichard Smith2011-10-131-1/+1
| | | | | | -std=c++0x. Patch by Ahmed Charles! llvm-svn: 141900
* Implement C++0x [temp.arg.template]p3, which allows slightly fuzzyDouglas Gregor2011-01-131-0/+17
| | | | | | | | matching of variadic template template parameters to template arguments. This paragraph was the subject of ISO C++ committee document N2555: Extending Variadic Template Template Parameters. llvm-svn: 123348
* Initial implementation of function parameter packs. This implementation allows:Douglas Gregor2011-01-051-0/+24
| | | | | | | | | | | | | | 1) Declaration of function parameter packs 2) Instantiation of function parameter packs within function types. 3) Template argument deduction of function parameter packs when matching two function types. We're missing all of the important template-instantiation logic for function template definitions, along with template argument deduction from the argument list of a function call, so don't even think of trying to use these for real yet. llvm-svn: 122926
* When we're converting deduced template arguments to the type of theDouglas Gregor2011-01-051-0/+27
| | | | | | | corresponding template parameter, make sure that prior converted template arguments are available for substitution. llvm-svn: 122902
* Replace the representation of template template argument packDouglas Gregor2011-01-051-0/+40
| | | | | | | | | | | | | expansions with something that is easier to use correctly: a new template argment kind, rather than a bit on an existing kind. Update all of the switch statements that deal with template arguments, fixing a few latent bugs in the process. I"m happy with this representation, now. And, oh look! Template instantiation and deduction work for template template argument pack expansions. llvm-svn: 122896
* Implement support for template template parameter packs, e.g.,Douglas Gregor2011-01-051-0/+26
| | | | | | | template<template<class> class ...Metafunctions> struct apply_to_each; llvm-svn: 122874
* When creating the injected-class-name for a class template involving aDouglas Gregor2011-01-041-3/+0
| | | | | | | non-type template parameter pack, make sure to create a pack expansion for the corresponding template argument. llvm-svn: 122799
* Add a test that is currently failingDouglas Gregor2011-01-031-0/+14
| | | | llvm-svn: 122780
* Another variadic template metafunction test case: summing values.Douglas Gregor2011-01-031-2/+16
| | | | llvm-svn: 122752
* Implement support for pack expansions whose pattern is a non-typeDouglas Gregor2011-01-031-0/+49
| | | | | | | | | | | | | | | | | template argument (described by an expression, of course). For example: template<int...> struct int_tuple { }; template<int ...Values> struct square { typedef int_tuple<(Values*Values)...> type; }; It also lays the foundation for pack expansions in an initializer-list. llvm-svn: 122751
* Consolidate template metafunction tests for variadic templates into a single ↵Douglas Gregor2011-01-031-0/+66
file llvm-svn: 122748
OpenPOWER on IntegriCloud