Design patterns for generic programming in C++

  • Authors:
  • Alexandre Duret-Lutz;Thierry Géraud;Akim Demaille

  • Affiliations:
  • EPITA Research and Development Laboratory, Le Kremlin-Bicêtre cedex, France;EPITA Research and Development Laboratory, Le Kremlin-Bicêtre cedex, France;EPITA Research and Development Laboratory, Le Kremlin-Bicêtre cedex, France

  • Venue:
  • COOTS'01 Proceedings of the 6th conference on USENIX Conference on Object-Oriented Technologies and Systems - Volume 6
  • Year:
  • 2001

Quantified Score

Hi-index 0.00

Visualization

Abstract

Generic programming is a paradigm whose wide adoption by the C++ community is quite recent. In this scheme most classes and procedures are parameterized, leading to the construction of general and efficient software components. In this paper, we show how some design patterns from Gamma et al. can be adapted to this paradigm. Although these patterns rely highly on dynamic binding, we show that, by intensive use of parametric polymorphism, the method calls in these patterns can be resolved at compile-time. In intensive computations, the generic patterns bring a significant speed-up compared to their classical peers.