boost::openmethod::missing_base

Missing base.

Synopsis

struct missing_base
    : openmethod_error

Base Classes

Name Description

openmethod_error

Base class for all OpenMethod errors.

Member Functions

Name

Description

write

Write a short description to an output stream

Data Members

Name

Description

base

The type_id of the base class.

derived

The type_id of the derived class.

Description

A class used in an overrider virtual parameter was not registered as a derived class of the class in the same position in the method's virtual parameter list.

Example

In the following code, OpenMethod cannot infer that Dog is derived from Animal, because they are not registered in a same call to BOOST_OPENMETHOD_CLASSES.

BOOST_OPENMETHOD_CLASSES(Animal);
BOOST_OPENMETHOD_CLASSES(Dog);

BOOST_OPENMETHOD(poke, (virtual_ptr<Animal>), void);

BOOST_OPENMETHOD_OVERRIDE(poke, (virtual_ptr<Dog>), void) { /* ... */ }

initialize(); // throws missing_base;

Fix:

BOOST_OPENMETHOD_CLASSES(Animal, Dog);

Created with MrDocs