diff options
author | Douglas Gregor <dgregor@apple.com> | 2011-01-10 07:32:04 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2011-01-10 07:32:04 +0000 |
commit | a8bac7f514ae46a7d4b26d05762ee799b78462ac (patch) | |
tree | bf0f230f837700c346bf9b48f9a61636364420e2 /clang/test/CXX/temp/temp.decls/temp.variadic/example-tuple.cpp | |
parent | eff85ad41b0d8886e587986944e9762bc1cf7b83 (diff) | |
download | bcm5719-llvm-a8bac7f514ae46a7d4b26d05762ee799b78462ac.tar.gz bcm5719-llvm-a8bac7f514ae46a7d4b26d05762ee799b78462ac.zip |
Work-in-progress implementation of C++0x [temp.arg.explicit]p9, which
allows an argument pack determines via explicit specification of
function template arguments to be extended by further, deduced
arguments. For example:
template<class ... Types> void f(Types ... values);
void g() {
f<int*, float*>(0, 0, 0); // Types is deduced to the sequence int*, float*, int
}
There are a number of FIXMEs in here that indicate places where we
need to implement + test retained expansions, plus a number of other
places in deduction where we need to correctly cope with the
explicitly-specified arguments when deducing an argument
pack. Furthermore, it appears that the RecursiveASTVisitor needs to be
auditied; it's missing some traversals (especially w.r.t. template
arguments) that cause it not to find unexpanded parameter packs when
it should.
The good news, however, is that the tr1::tuple implementation now
works fully, and the tr1::bind example (both from N2080) is actually
working now.
llvm-svn: 123163
Diffstat (limited to 'clang/test/CXX/temp/temp.decls/temp.variadic/example-tuple.cpp')
-rw-r--r-- | clang/test/CXX/temp/temp.decls/temp.variadic/example-tuple.cpp | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/clang/test/CXX/temp/temp.decls/temp.variadic/example-tuple.cpp b/clang/test/CXX/temp/temp.decls/temp.variadic/example-tuple.cpp index ff8dfda7686..3b4bd7777d5 100644 --- a/clang/test/CXX/temp/temp.decls/temp.variadic/example-tuple.cpp +++ b/clang/test/CXX/temp/temp.decls/temp.variadic/example-tuple.cpp @@ -206,9 +206,6 @@ get(const tuple<Values...>& t) { return get_impl<I, tuple<Values...> >::get(t); } -#if 0 -// FIXME: Not yet functional, because we aren't currently able to -// extend a partially-explicitly-specified parameter pack. void test_element_access(tuple<int*, float*, double*&> t3) { int i; float f; @@ -217,7 +214,6 @@ void test_element_access(tuple<int*, float*, double*&> t3) { get<1>(t3) = &f; get<2>(t3) = &d; } -#endif // Relational operators inline bool operator==(const tuple<>&, const tuple<>&) { return true; } |