The Standard Template Library (STL) [15, 19] is a C++ implementation of the generic programming paradigm [16]. Unlike in typical container class libraries, algorithms in this paradigm do not work directly on collection container objects. They work on iterators (access and traversal objects) exported by containers. Given N data types, M containers, and K algorithms as components of a software system, STL provides a mechanism - using C++ templates and the generic programming paradigm - to reduce the possibly N*M*K implementations to N+M+K implementations.
Over the last decade significant research has been done in the area of object-oriented parallelism and a number of models, libraries, and language extensions have been proposed and implemented. C++ has been an important language for writing parallel libraries and for extending for parallelism. In this paper we discuss how the generic programming paradigm in STL can be used and extended to support parallel programming in a manner that allows good expressibility, code reuse, and extensibility of the library. We look at control and data-parallel abstractions. We also discuss how different strategies for work distribution in parallel algorithms can be supported in the spirit of generic programming. We describe the relevant abstractions in Coir<Futures> [23], our STL-based parallel C++ library for shared memory parallelism.