A
Andre Siqueira
Hello all,
I have a member function like thist:
Query(const std::string & id, std::auto_ptr<Modifier> modif =
std::auto_ptr<Modifier>())
when a try to instantiate a Query like
Query("123");
my compiler (aCC on HP-UX) gives me an error teling that a can pass
an objectet std::auto_ptr<Modifier> & em um objecto
std::auto_ptr<Modifier>
This is the Error:
Error 226: "AssociatedDataPersistente.cpp", line 36 # No appropriate
function found for call of 'auto_ptr::auto_ptr'. Last viable candidate
was
"std::auto_ptr<persistencia::impl:bjectel::ModificadorQuery>::auto_ptr(std::auto_ptr<persistencia::impl:bjectel::ModificadorQuery>
&)" ["/opt/aCC/include_std/memory", line 838]. Argument of type
'class auto_ptr<persistencia::impl:bjectel::ModificadorQuery>' could
not be converted to
'std::auto_ptr<persistencia::impl:bjectel::ModificadorQuery> &'.
Query q(type);
^
Warning: 1 future errors were detected and suppressed. Either
remove the '-w' option or add a '+p' option to detect and fix them
before they become fatal errors in a future release.
*** Error exit code 2
This problem started when a change the option -Aa to -AA on aCC.
Is the unique form to initialize an std::auto_ptr like that:
std::auto_ptr<Modifier> test (new Modifier);
thanks,
André Siqueira.
I have a member function like thist:
Query(const std::string & id, std::auto_ptr<Modifier> modif =
std::auto_ptr<Modifier>())
when a try to instantiate a Query like
Query("123");
my compiler (aCC on HP-UX) gives me an error teling that a can pass
an objectet std::auto_ptr<Modifier> & em um objecto
std::auto_ptr<Modifier>
This is the Error:
Error 226: "AssociatedDataPersistente.cpp", line 36 # No appropriate
function found for call of 'auto_ptr::auto_ptr'. Last viable candidate
was
"std::auto_ptr<persistencia::impl:bjectel::ModificadorQuery>::auto_ptr(std::auto_ptr<persistencia::impl:bjectel::ModificadorQuery>
&)" ["/opt/aCC/include_std/memory", line 838]. Argument of type
'class auto_ptr<persistencia::impl:bjectel::ModificadorQuery>' could
not be converted to
'std::auto_ptr<persistencia::impl:bjectel::ModificadorQuery> &'.
Query q(type);
^
Warning: 1 future errors were detected and suppressed. Either
remove the '-w' option or add a '+p' option to detect and fix them
before they become fatal errors in a future release.
*** Error exit code 2
This problem started when a change the option -Aa to -AA on aCC.
Is the unique form to initialize an std::auto_ptr like that:
std::auto_ptr<Modifier> test (new Modifier);
thanks,
André Siqueira.