diff options
| author | Richard Smith <richard-llvm@metafoo.co.uk> | 2017-01-09 08:01:21 +0000 |
|---|---|---|
| committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2017-01-09 08:01:21 +0000 |
| commit | 6eedfe77c15fa95b421b413bb6b09f405e212196 (patch) | |
| tree | 20c2b59cfc2b8160a63af5388d929c1752284f1f /clang/test/SemaTemplate/deduction.cpp | |
| parent | 082c183f06adeda811baad65e4bbd4016543dca7 (diff) | |
| download | bcm5719-llvm-6eedfe77c15fa95b421b413bb6b09f405e212196.tar.gz bcm5719-llvm-6eedfe77c15fa95b421b413bb6b09f405e212196.zip | |
Implement C++ DR1391 (wg21.link/cwg1391)
Check for implicit conversion sequences for non-dependent function
template parameters between deduction and substitution. The idea is to accept
as many cases as possible, on the basis that substitution failure outside the
immediate context is much more common during substitution than during implicit
conversion sequence formation.
This re-commits r290808, reverted in r290811 and r291412, with a couple of
fixes for handling of explicitly-specified non-trailing template argument
packs.
llvm-svn: 291427
Diffstat (limited to 'clang/test/SemaTemplate/deduction.cpp')
| -rw-r--r-- | clang/test/SemaTemplate/deduction.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/test/SemaTemplate/deduction.cpp b/clang/test/SemaTemplate/deduction.cpp index 499b376855e..0c0e7d599cc 100644 --- a/clang/test/SemaTemplate/deduction.cpp +++ b/clang/test/SemaTemplate/deduction.cpp @@ -361,6 +361,10 @@ namespace deduction_after_explicit_pack { g<int, float&, double&>(a, b, c, &c); // ok } + template<class... ExtraArgs> + int test(ExtraArgs..., unsigned vla_size, const char *input); + int n = test(0, ""); + template <typename... T> void i(T..., int, T..., ...); // expected-note 5{{deduced conflicting}} void j() { i(0); |

