This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/46394] New: [C++0X] no matching function with default template argument
- From: "marc.glisse at normalesup dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 9 Nov 2010 14:41:26 +0000
- Subject: [Bug c++/46394] New: [C++0X] no matching function with default template argument
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46394
Summary: [C++0X] no matching function with default template
argument
Product: gcc
Version: 4.6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: marc.glisse@normalesup.org
This code recently stopped compiling. (I have a remove_cv on top of the
remove_reference in the original code but it didn't look necessary to reproduce
the problem)
#include <utility>
#include <tuple>
#include <type_traits>
struct A {
template<class...U,class=
typename std::enable_if<
!std::is_same<
std::tuple<typename std::remove_reference<U>::type...>,
std::tuple<A>
>::value
>::type
>
A(U&&...u) ;
};
int main(){
A a(1,2,3);
}
bug.cc: In function âint main()â:
bug.cc:16:11: error: no matching function for call to âA::A(int, int, int)â
bug.cc:13:13: note: candidates are: template<class ... U, class> A::A(U&& ...)
bug.cc:4:8: note: constexpr A::A(const A&)
bug.cc:4:8: note: constexpr A::A(A&&)