Understanding C++ Expression Templates - Angelika Langer
Understanding C++ Expression Templates - Angelika Langer
Understanding C++ Expression Templates - Angelika Langer
- No tags were found...
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
40OO Implementation à la GOFSorterComparator* _cmpSorter(Comparator*)Comparatorlessthan()= 0sort()_cmp->lessthan()asciilessthan()caseinsensitivelessthan()culturesensitivelessthan()© Copyright 1995-2000 by <strong>Angelika</strong> <strong>Langer</strong>. All Rights Reserved.http://www.<strong>Angelika</strong><strong>Langer</strong>.com(80)last update: 11/7/2005 ,21:37The Contextclass Sorter{public:explicit Sorter(Comparator* c) : _cmp(c) {}void sort(const StringContainer& c){ ... _cmp->lessthan(lhs,rhs) ... }private:Comparator* _cmp;};© Copyright 1995-2000 by <strong>Angelika</strong> <strong>Langer</strong>. All Rights Reserved.http://www.<strong>Angelika</strong><strong>Langer</strong>.com(81)last update: 11/7/2005 ,21:37