https://llvm.org/bugs/show_bug.cgi?id=26047
Bug ID: 26047 Summary: erroneous substitution failure through a type alias on variadic template Product: clang Version: 3.6 Hardware: PC OS: Linux Status: NEW Severity: normal Priority: P Component: C++11 Assignee: unassignedclangb...@nondot.org Reporter: eric.s.wall...@intel.com CC: dgre...@apple.com, llvm-bugs@lists.llvm.org Classification: Unclassified Created attachment 15571 --> https://llvm.org/bugs/attachment.cgi?id=15571&action=edit The test case from the description, but pre-processed The following code seems to produce an erroneous substitution failure: ==== template <typename... Ts> struct function { }; template <typename... Ts> using Callback = function<void(Ts...)>; template <typename... Ts> void foo(Callback<Ts...> callback) { } void foo_int(Callback<int> callback) { } template <typename... Ts> void foo_no_type_indirection(function<void(Ts...)> callback) { } int main() { Callback<int> callback = function<void(int)>{}; foo_int(callback); // succeeds foo_no_type_indirection(callback); // succeeds foo(callback); // fails: substitution failure return 0; } ==== Note that if the substitution is done by hand (the "foo_int" case), the call succeeds. Also if we don't go through the "Callback" type alias (the "foo_no_type_indirection" case), the call succeeds. Variadic templates are also required here; when I tested using a single argument template, clang succeeded. This test case compiles with gcc4.8. There are a few other substitution failures kicking around in the bug list, but none looked quite like this. I thought this test case might be useful even if it turns out to be a duplicate problem. -- You are receiving this mail because: You are on the CC list for the bug.
_______________________________________________ llvm-bugs mailing list llvm-bugs@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs