SimpleConcepts: A Lightweight Extension to C++ to Support Constraints on Generic Types
Computer Science and Information Systems, Tome 11 (2014) no. 4
Cet article a éte moissonné depuis la source Computer Science and Information Systems website
Generic programming plays an essential role in C++ software through the use of templates. However, both the creation and use of template libraries is hindered by the fact that the language does not allow programmers to specify constraints on generic types. To date, no proposal to update the language to provide concepts has survived the committee process. Until that time comes, as a form of early support, this paper introduces SimpleConcepts, an extension to C++11 that provides support for concepts, sets of constraints on generic types. SimpleConcepts features are parsed according to an island grammar and source-to-source translation is used to lower concepts to pure C++11 code.
Keywords:
Generic Programming, C++ Templates, C++ Concepts
@article{CSIS_2014_11_4_a9,
author = {Reed Milewicz and Marjan Mernik and Peter Pirkelbauer},
title = {SimpleConcepts: {A} {Lightweight} {Extension} to {C++} to {Support} {Constraints} on {Generic} {Types}},
journal = {Computer Science and Information Systems},
year = {2014},
volume = {11},
number = {4},
url = {http://geodesic.mathdoc.fr/item/CSIS_2014_11_4_a9/}
}
TY - JOUR AU - Reed Milewicz AU - Marjan Mernik AU - Peter Pirkelbauer TI - SimpleConcepts: A Lightweight Extension to C++ to Support Constraints on Generic Types JO - Computer Science and Information Systems PY - 2014 VL - 11 IS - 4 UR - http://geodesic.mathdoc.fr/item/CSIS_2014_11_4_a9/ ID - CSIS_2014_11_4_a9 ER -
%0 Journal Article %A Reed Milewicz %A Marjan Mernik %A Peter Pirkelbauer %T SimpleConcepts: A Lightweight Extension to C++ to Support Constraints on Generic Types %J Computer Science and Information Systems %D 2014 %V 11 %N 4 %U http://geodesic.mathdoc.fr/item/CSIS_2014_11_4_a9/ %F CSIS_2014_11_4_a9
Reed Milewicz; Marjan Mernik; Peter Pirkelbauer. SimpleConcepts: A Lightweight Extension to C++ to Support Constraints on Generic Types. Computer Science and Information Systems, Tome 11 (2014) no. 4. http://geodesic.mathdoc.fr/item/CSIS_2014_11_4_a9/