http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48224

Evgenij <evgenij.fokin at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |UNCONFIRMED
         Resolution|INVALID                     |

--- Comment #3 from Evgenij <evgenij.fokin at gmail dot com> 2011-03-22 
09:38:34 UTC ---
Andrew, your code works fine. But this example can show another problem.

Remove setter from code and change return type for getter.

#include <map>

struct structure;

typedef std::map<int, structure> mapOfStructure;

class simpleClass
{
    mapOfStructure m_mos;
    const mapOfStructure GetMos () const { return m_mos; }
};

struct structure
{
    int i;
};

--- CUT ---
Getter returns incomplete type but no compile error.
Why the getter compiles without error and the setter compiles with error?

Reply via email to