mirror of
https://github.com/boostorg/openmethod.git
synced 2026-01-19 04:22:12 +00:00
18 lines
282 B
C++
18 lines
282 B
C++
// cat.cpp
|
|
|
|
#include <iostream>
|
|
#include <boost/openmethod.hpp>
|
|
|
|
#include "cat.hpp"
|
|
|
|
namespace felines {
|
|
|
|
BOOST_OPENMETHOD_CLASSES(animals::Animal, Cat);
|
|
|
|
BOOST_OPENMETHOD_OVERRIDE(
|
|
poke, (std::ostream & os, virtual_ptr<Cat> cat), void) {
|
|
os << cat->name << " hisses";
|
|
}
|
|
|
|
}
|