boost::openmethod::missing_base
Missing base.
Synopsis
Declared in <boost/openmethod/preamble.hpp>
struct missing_base
: openmethod_error
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
|
The error goes to the registry's |
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.
// registered separately, so the inheritance is never seen
BOOST_OPENMETHOD_CLASSES(Animal);
BOOST_OPENMETHOD_CLASSES(Dog);
BOOST_OPENMETHOD(poke, (virtual_ptr<Animal>), void);
BOOST_OPENMETHOD_OVERRIDE(poke, (virtual_ptr<Dog>), void) {
// ...
}
// aborts with error message: missing base Animal -<| Dog
initialize();
Fix:
BOOST_OPENMETHOD_CLASSES(Animal, Dog);
See Also
Created with MrDocs