㆒ 般㆟ 對 C++ templates 的粗淺印象,大約停留在「容器(containers)」的製作㆖ 。稍有研究
則會發(fā)現(xiàn),templates衍生出來的 C++ Generic Programming(泛型編程)技術(shù),在 C++ 標(biāo)準(zhǔn)程
式庫㆗ 已經(jīng)遍㆞ 開花結(jié)果。以 STL為重要骨幹的 C++ 標(biāo)準(zhǔn)程式庫,將 templates 廣泛運(yùn)用於容
器 (containers) 、演算法 (algorithms) 、仿函式 (functors) 、配接器 (adapters) 、配置器 (allocators) 、
迭代器(iterators)㆖ 頭,無處不在,無役不與,乃至於原有的 class-based iostream都被改寫為
template-based iostream。
標(biāo)簽:
templates
12690
12703
上傳時(shí)間:
2016-10-28
上傳用戶:rocwangdp