Bug#619130: ERROR: compile in g++-4.5
Package: g++-4.5
Version: 4.5.2-4
I have found the code normal working with g++-4.4. After upgrade to
g++-4.5 I see "ERROR: compile".
I make simple code for demonstration this compile error. Look attached
files.
$ g++ compileError.cxx
In file included from /usr/include/c++/4.5/bits/stl_algobase.h:66:0,
from /usr/include/c++/4.5/bits/stl_tree.h:62,
from /usr/include/c++/4.5/map:60,
from compileError.hxx:1,
from compileError.cxx:1:
/usr/include/c++/4.5/bits/stl_pair.h: In instantiation of
‘std::pair<const int, structure>’:
compileError.hxx:11:62: instantiated from here
/usr/include/c++/4.5/bits/stl_pair.h:77:11: error: ‘std::pair<_T1,
_T2>::second’ has incomplete type
compileError.hxx:3:8: error: forward declaration of ‘struct structure’
distcc[7487] ERROR: compile compileError.cxx on localhost failed
--
With best regards
Evgeny,
e-mail: efokin@mera.ru
#include "compileError.hxx"
int main()
{
mapOfStructure tmp;
return 0;
}
#include <map>
struct structure;
typedef std::map<int, structure> mapOfStructure;
class simleClass
{
mapOfStructure m_mos;
const mapOfStructure& GetMos () const { return m_mos; }
inline void SetMos ( const mapOfStructure& v ) { m_mos = v; }
};
struct structure
{
int i;
};
Reply to: