首页    期刊浏览 2024年10月07日 星期一
登录注册

文章基本信息

  • 标题:SimpleConcepts: A lightweight extension to C++ to support constraints on generic types
  • 本地全文:下载
  • 作者:Milewicz Reed ; Mernik Marjan ; Pirkelbauer Peter
  • 期刊名称:Computer Science and Information Systems
  • 印刷版ISSN:1820-0214
  • 电子版ISSN:2406-1018
  • 出版年度:2014
  • 卷号:11
  • 期号:4
  • 页码:1361-1379
  • DOI:10.2298/CSIS131209053M
  • 出版社:ComSIS Consortium
  • 摘要:

    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.

  • 关键词:generic programming; C++ templates; C++ concepts
国家哲学社会科学文献中心版权所有