In C + + 11 and later versions, object.h in ptlib library There is an error in the definition statement of pautoptr in H file, and a line of code is missing. The original code is:
template <typename t=""> class PAutoPtr : public std::unique_ ptr<t></t></typename>
{
public:
PAutoPtr() = default;
explicit PAutoPtr(T * p) : std::unique_ ptr<t>(p) { }</t>
void transfer(PAutoPtr & other) { std::unique_ptr<t>::operator=(std::move(other)); }</t>
};
The actual should be:
template <typename t=""> class PAutoPtr : public std::unique_ ptr<t></t></typename>
{
public:
PAutoPtr() = default;
explicit PAutoPtr(T * p) : std::unique_ ptr<t>(p) { }</t>
PAutoPtr(PAutoPtr & other) : std::unique_ ptr<t>(other.release()) { }</t>
void transfer(PAutoPtr & other) { std::unique_ptr<t>::operator=(std::move(other)); }</t>
};
Such an obvious error can be found by compiling with C + + 11, that is, why not modify it