auto_ptr does not define an assignment operator for it's template type. The only allowed assignment is from another auto_ptr (and it's constructor from the pointer is explicit). This is done to protect accidental misuse of auto_ptr, as auto_ptr assumes ownership of the memory.
My guess is that you need the assignment form to use multiple queries after another like:
// initialize using constructor
auto_ptr
table(db->query("select * from t1"));
...
// new query using assignment
table = auto_ptr
(db->query("select * from t2"));
...
// another query using assignment
table = auto_ptr