// B. Malloy, Summer 2002 // In main, we assemble the number manager, including // the find policy that we want the manager to use. // Policy-based class design is a compile-time alternative // to the Strategy Design Pattern (GoF, page 315) #include "findpolicy.h" #include "numbermanager.h" const int NumberManager >::ELEMENT_MAX; int main() { NumberManager > man; std::vector::const_iterator ptr = man.find(99); if ( ptr != man.end() ) std::cout << *ptr << std::endl; }