// database application example
//
// DB is database of type T objects using
// allocation policy class Alloc<T>
//
// There are two allocation techniques depending on
// the object type, one for:
//
// large objects (LO); and
// small objects (SO)
//
template< class OT, template< class > class Alloc >
class DB : public Alloc<OT>
{
/* ... */
};
class OT { }; // Object types
template<class T> class LO { };// Large Object allocator
template<class T> class SO { };// Small Object allocator
int main()
{
DB<OT,SO> db; // create database for objects of type
// OT with small object allocation
return 0;
}