Files
openmethod/examples/headers_namespaces/cat.cpp
2025-04-21 08:02:33 -04:00

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";
}
}