Generic programming and the STL: using and extending the C++ Standard Template Library
Generic programming and the STL: using and extending the C++ Standard Template Library
On Variance-Based Subtyping for Parametric Types
ECOOP '02 Proceedings of the 16th European Conference on Object-Oriented Programming
C++ Template Metaprogramming: Concepts, Tools, and Techniques from Boost and Beyond (C++ in Depth Series)
Software—Practice & Experience - Research Articles
Concepts: linguistic support for generic programming in C++
Proceedings of the 21st annual ACM SIGPLAN conference on Object-oriented programming systems, languages, and applications
Library composition and adaptation using c++ concepts
GPCE '07 Proceedings of the 6th international conference on Generative programming and component engineering
The forced evolution of implementations: using a Monte Carlo algorithm as example
Proceedings of the 8th workshop on Parallel/High-Performance Object-Oriented Scientific Computing
Science of Computer Programming
Dynamic algorithm selection for runtime concepts
Science of Computer Programming
Measuring the Overhead of C++ Standard Template Library Safe Variants
Electronic Notes in Theoretical Computer Science (ENTCS)
Hi-index | 0.00 |
A key benefit of generic programming is its support for producing modules with clean separation. In particular, generic algorithms are written to work with a wide variety of unmodified types. The Runtime concept idiom extends this support by allowing unmodified concrete types to behave in a runtime polymorphic manner. In this paper, we describe one implementation of the runtime concept idiom, in the domain of the C++ standard template library (STL). We describe and measure the performance of runtime-polymorphic analogs of several STL algorithms. We augment the runtime concept idiom by employing a dispatch mechanism that considers both type and concept information to maximize performance when selecting algorithm implementations. We use our implementation to demonstrate the effects of different compile-time vs. run-time algorithm selection choices, and we indicate where improved language and compiler support would be useful.