Electronic Notes in Theoretical Computer Science · 2011 · 18 citations · 11 references
The C++ Standard Template Library is a widely-used library that is based on the generic programming paradigm. The usage of this library does not warrant bug-free programs. Furthermore, many new errors may arise from the inaccurate use of the generic programming paradigm, like dereferencing invalid iterators or misunderstanding remove-like algorithms. Most of the STL algorithms have preconditions which are checked neither at compilation time nor at runtime. Violation of such a precondition results in undefined behaviour. In this paper we propose solutions for a subset of these problems. The techniques we describe help programmers use generic algorithms on sorted intervals in a safer way. We present a new iterator adaptor type and tag as well as safe containers which keep track their iteratorsʼ validness. We measure the runtime overhead of these extensions.
11
Rex Jaeschke · ACM SIGPLAN Notices · 1998 · 543 citations · Full text
High-level Programming Language, Engineering, Program Analysis +10
Douglas Gregor, Jaakko Järvi, Jeremy G. Siek et al. · 2006 · 193 citations
Algorithm specialization in generic programming
Jaakko Järvi, Douglas Gregor, Jeremiah Willcock et al. · ACM SIGPLAN Notices · 2006 · 35 citations
Mathematical Programming, Engineering, Compiler Technology +18