This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/46394] New: [C++0X] no matching function with default template argument


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&&)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]