G
gg
I am getting the following compilation errors with the following
program. My compiler is aCC 03.27 on HP-UX11 -
#include <iostream>
using namespace std;
#include <list>
#include <memory>
#include <string>
int main ( void )
{
auto_ptr < list < auto_ptr < string > > > list1;
auto_ptr < list < auto_ptr < string > > > list2;
auto_ptr < string > strAPT1 (new string ( "a" ) );
auto_ptr < string > strAPT2 (new string ( "b" ) );
auto_ptr < string > strAPT3 (new string ( "c" ) );
list1->push_back ( strAPT1 );
list1->push_back ( strAPT2 );
list1->push_back ( strAPT3 );
}
Error 226: "/opt/aCC/include_std/memory", line 187 # No appropriate
function found for call of 'auto_ptr::auto_ptr'. Last viable
candidate was
converted to
'std::basic_string<char,std::char_traits<char>,std::allocator<char> >
*'.
new (__p) _TypeT (__val);
^^^^^^^^^^^^^^^^^^^^^^^^
Error 556: "/opt/aCC/include_std/list", line 911 # Unable to generate
specialization "void
^^^^^^^^^^^^^^^^^^
Error 556: "/opt/aCC/include_std/list", line 911 # Unable to generate
specialization "void
^^^^^^^^^^^^^^^^^^
program. My compiler is aCC 03.27 on HP-UX11 -
#include <iostream>
using namespace std;
#include <list>
#include <memory>
#include <string>
int main ( void )
{
auto_ptr < list < auto_ptr < string > > > list1;
auto_ptr < list < auto_ptr < string > > > list2;
auto_ptr < string > strAPT1 (new string ( "a" ) );
auto_ptr < string > strAPT2 (new string ( "b" ) );
auto_ptr < string > strAPT3 (new string ( "c" ) );
list1->push_back ( strAPT1 );
list1->push_back ( strAPT2 );
list1->push_back ( strAPT3 );
}
Error 226: "/opt/aCC/include_std/memory", line 187 # No appropriate
function found for call of 'auto_ptr::auto_ptr'. Last viable
candidate was
Argument of type 'const::auto_ptr(std::basic_string<char,std::char_traits<char>,std::allocator<char> > *)" ["/opt/aCC/include_std/memory", line 830].
converted to
'std::basic_string<char,std::char_traits<char>,std::allocator<char> >
*'.
new (__p) _TypeT (__val);
^^^^^^^^^^^^^^^^^^^^^^^^
Error 556: "/opt/aCC/include_std/list", line 911 # Unable to generate
specialization "void
,std::auto_ptr<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >
_RWSTD_VALUE_ALLOC (_C_value_alloc_type,(std::auto_ptr<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > *,const
^^^^^^^^^^^^^^^^^^
Error 556: "/opt/aCC/include_std/list", line 911 # Unable to generate
specialization "void
,std::auto_ptr<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >
_RWSTD_VALUE_ALLOC (_C_value_alloc_type,(std::auto_ptr<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > *,const
^^^^^^^^^^^^^^^^^^