Skip to content

make the library fully usable without RTTI #293

@robUx4

Description

@robUx4

RTTI (Runtime Type Idenfitication) used with dynamic_cast<> allows casting do a type or to nullptr if the type doesn't match. It is a very useful feature. But it's also a costly feature at runtime. It's also potentially introduces nullptr in places where it shouldn't be. So it should be avoided whenever possible. In some environment it's even turned off.

mkvtoolnix uses it a lot and even mkvtree needs it to differentiate between base EBML types to display. It can be partly avoided by adding the EBML type inside the EbmlCallbacks (aka element spec). All EBML elements have a type defined in the EBML RFC. It can be used as an enum to initialize each EbmlCallbacks.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions