esrille / escudo

The Escudo Web Browser
Apache License 2.0
68 stars 13 forks source link

Move Any::initialize member functions to Object.h #32

Closed Constellation closed 11 years ago

Constellation commented 11 years ago

This chagne suppresses compile error with clang++.

(Any): Extend Any heap size to accept libc++ u16string size (Any::initialize): Move them to Object.h

ShikiOkasaka commented 11 years ago

Just curious. Is this required because there are files that do not include "Any.h" even if it is necessary?

Constellation commented 11 years ago

By using clang++, currenlty these files raise compile error.

In file included from src/Test.util.cpp:17:
In file included from ./src/Test.util.h:22:
In file included from ./src/Object.h:20:
./src/Any.h:107:24: error: allocation of incomplete type 'Object'
            new(&heap) Object(value.self());
                       ^~~~~~
./src/nullable.h:26:7: note: forward declaration of 'Object'
class Object;
      ^
In file included from src/Test.util.cpp:17:
In file included from ./src/Test.util.h:22:
In file included from ./src/Object.h:20:
./src/Any.h:118:24: error: allocation of incomplete type 'Object'
            new(&heap) Object(value);
                       ^~~~~~
./src/nullable.h:26:7: note: forward declaration of 'Object'
class Object;
      ^

A template instantiation of Any::initialize is performed before class Object is defined.

ShikiOkasaka commented 11 years ago

:+1: Thanks for the info. I'll investigate this issue later.

ShikiOkasaka commented 11 years ago

Merged at abdf09ae1b381def4ec2c3a0beee31cfd4538246