_uj
December 17th, 2003, 12:09 PM
When I try to declare this in a header file I get a warning.
auto_ptr<ifstream> ifs;
The program works but how can I get rid of this warning?
C:\Program\Microsoft Visual Studio .NET 2003\Vc7\include\memory(484) : warning C4150: deletion of pointer to incomplete type 'std::basic_ifstream<_Elem,_Traits>'; no destructor called
with
[
_Elem=char,
_Traits=std::char_traits<char>
]
C:\Program\Microsoft Visual Studio .NET 2003\Vc7\include\memory(484) : see reference to class template instantiation 'std::basic_ifstream<_Elem,_Traits>' being compiled
with
[
_Elem=char,
_Traits=std::char_traits<char>
]
C:\Program\Microsoft Visual Studio .NET 2003\Vc7\include\memory(483) : while compiling class-template member function 'std::auto_ptr<_Ty>::~auto_ptr(void)'
with
[
_Ty=std::ifstream
]
c:\MINT\mint1\XLoadAtoms.h(13) : see reference to class template instantiation 'std::auto_ptr<_Ty>' being compiled
with
[
_Ty=std::ifstream
]
auto_ptr<ifstream> ifs;
The program works but how can I get rid of this warning?
C:\Program\Microsoft Visual Studio .NET 2003\Vc7\include\memory(484) : warning C4150: deletion of pointer to incomplete type 'std::basic_ifstream<_Elem,_Traits>'; no destructor called
with
[
_Elem=char,
_Traits=std::char_traits<char>
]
C:\Program\Microsoft Visual Studio .NET 2003\Vc7\include\memory(484) : see reference to class template instantiation 'std::basic_ifstream<_Elem,_Traits>' being compiled
with
[
_Elem=char,
_Traits=std::char_traits<char>
]
C:\Program\Microsoft Visual Studio .NET 2003\Vc7\include\memory(483) : while compiling class-template member function 'std::auto_ptr<_Ty>::~auto_ptr(void)'
with
[
_Ty=std::ifstream
]
c:\MINT\mint1\XLoadAtoms.h(13) : see reference to class template instantiation 'std::auto_ptr<_Ty>' being compiled
with
[
_Ty=std::ifstream
]