“No matching function for call error” with g++

前端 未结 4 1483
悲&欢浪女
悲&欢浪女 2021-01-28 03:47

I have a class A

template
class A : public std::auto_ptr
{
    typedef std::auto_ptr Super;
public:
    A() : Super() { }
            


        
4条回答
  •  野性不改
    2021-01-28 04:41

    It looks compiler talks that it cannot choose right function: constructor A from pointer A::A(T*) or copy constructor A::A(A &). Maybe it worth to change definition to explicit A(T* t) : Super(t) { }

提交回复
热议问题