2000 · 92 citations · 5 references
ComputingComputer ScienceCompilersComputer ArchitectureProgramming LanguagesData TypesGeneric ProgrammingParameterizationType CheckingType SystemsAbstract Data TypesAbstract TypesParametric PolymorphismParametricityPolymorphic Type SystemsPolymorphic TypesStatic Type CheckingType Parameterization
. Generic programming in C++ is characterized by the use of template parameters to represent abstract data types (or "concepts"). However, the C++ language itself does not provide a mechanism for explicitly handling concepts. As a result, it can be difficult to insure that a concrete type meets the requirements of the concept it is supposed to represent. Error messages resulting from incorrect use of a concrete type can be particularly difficult to decipher. In this paper we present techniques to check parameters in generic C++ libraries. Our techniques use standard C++ and introduce no run-time overhead. 1 Introduction A concept is a set of requirements (valid expressions, associated types, semantic invariants, complexity guarantees, etc.) that a type must fulfill to be correctly used within the context of a generic algorithm. In C++, concepts are represented by formal template parameters to function templates (generic algorithms). However, C++ has no explicit mechanism for ...
5
Making the future safe for the past
Gilad Bracha, Martin Odersky, David Stoutamire et al. · 1998 · 503 citations · Full text
Alexander A. Stepanov, Meng Lee · 1998 · 409 citations
Kim B. Bruce, Luca Cardelli, Giuseppe Castagna et al. · Theory and Practice of Object Systems · 1995 · 197 citations
Mark Day, Robert Gruber, Barbara Liskov et al. · 1995 · 84 citations · Full text