C++ -- Is there an implicit cast here from Fred* to auto_ptr<Fred>?
- by q0987
Hello all,
I saw the following code,
#include <new>
#include <memory>
using namespace std;
class Fred; // Forward declaration
typedef auto_ptr<Fred> FredPtr;
class Fred {
public:
static FredPtr create(int i)
{
return new Fred(i); // Is there an implicit casting here? If not, how can we return
…