>>>>> "Lars" == Lars Gullik Bjønnes <[EMAIL PROTECTED]> writes:
Lars> Actually this kind of bloat I refuse to care about. Same goes
Lars> with "bloat" in exceptions.
Lars> If the problem could be solved more elegantly without rtti is a
Lars> completely different matter. I can certainly be persuaded to do
Lars> things differently.
Only Asger knows for sure, but it seems to me that we could have code
which is as readable (and as fast by being clever enough) as pure rtti
code. This is not true in general, but should work there. Instead of
doing
InsetChunk * inset2 = dynamic_cast<InsetChunk *>inset1;
if (inset2 !=0) {
...
}
we could just do
InsetChunk * inset2 = static_cast<InsetChunk *>inset1;
if (hasRightType(inset2)) {
...
}
or maybe if we are not in an InsetChunk method, something like (do
static virtual methods exist?)
InsetChunk * inset2 = static_cast<InsetChunk *>inset1;
if (InsetChunk.hasRightType(inset2)) {
...
}
JMarc