C plus plus Metastring Library and Its Applications

被引:0
|
作者
Szugyi, Zalan [1 ]
Sinkovics, Abel [1 ]
Pataki, Norbert [1 ]
Porkolab, Zoltan [1 ]
机构
[1] Eotvos Lorand Univ, Dept Programming Languages & Compilers, H-1117 Budapest, Hungary
关键词
D O I
暂无
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
C++ template metaprogramming is an emerging direction of generative programming: with proper template definitions we can enforce the C++ compiler to execute algorithms at compilation time. Template metaprograms have become essential part of today's C++ programs of industrial size; they provide code adoptions, various optimizations, DSL embedding, etc. Besides the compilation time algorithms, template metaprogram data-structures are particularly important. From simple typelists to more advanced STL-like data types there are a variety of such constructs. Interesting enough, until recently string, as one of the most widely used data type of programming, has not been supported. Although, boost: :mpl: :string is an advance in this area, it still lacks the most fundamental string operations. In this paper, we analysed the possibilities of handling string objects at compilation time with a metastring library. We created a C++ template metaprogram library that provides the common string operations, like creating sub-strings, concatenation, replace, and similar. To provide real-life use-cases we implemented two applications on top of our Metastring library. One use case utilizes compilation time inspection of input in the domain of pattern matching algorithms, thus we are able to select the more optimal search method at compilation time. The other use-case implements safePrint, a type-safe version of printf - a widely investigated problem. We present both the performance improvements and extended functionality we have achieved in the applications of our Metastring library.
引用
收藏
页码:461 / 480
页数:20
相关论文
共 50 条
  • [1] A C plus plus Header Library for Web Applications
    Okamoto, Shusuke
    Kohana, Masaki
    PROCEEDINGS OF 2016 19TH INTERNATIONAL CONFERENCE ON NETWORK-BASED INFORMATION SYSTEMS (NBIS), 2016, : 541 - 545
  • [2] Computational wave optics library for C plus plus: CWO plus plus library
    Shimobaba, Tomoyoshi
    Weng, Jiantong
    Sakurai, Takahiro
    Okada, Naohisa
    Nishitsuji, Takashi
    Takada, Naoki
    Shiraki, Atsushi
    Masuda, Nobuyuki
    Ito, Tomoyoshi
    COMPUTER PHYSICS COMMUNICATIONS, 2012, 183 (05) : 1124 - 1138
  • [3] The Pinocchio C plus plus library
    Carpentier, Justin
    Saurel, Guilhem
    Buondonno, Gabriele
    Mirabel, Joseph
    Lamiraux, Florent
    Stasse, Olivier
    Mansard, Nicolas
    2019 IEEE/SICE INTERNATIONAL SYMPOSIUM ON SYSTEM INTEGRATION (SII), 2019, : 614 - 619
  • [4] SSW Library: An SIMD Smith-Waterman C/C plus plus Library for Use in Genomic Applications
    Zhao, Mengyao
    Lee, Wan-Ping
    Garrison, Erik P.
    Marth, Gabor T.
    PLOS ONE, 2013, 8 (12):
  • [5] A C plus plus Library for Tensor Decomposition
    Huang, Jiapeng
    Kong, Linghe
    Liu, Xiao-Yang
    Qu, Wenhao
    Chen, Guihai
    2019 IEEE 38TH INTERNATIONAL PERFORMANCE COMPUTING AND COMMUNICATIONS CONFERENCE (IPCCC), 2019,
  • [6] ZKCM: A C plus plus library for multiprecision matrix computation with applications in quantum information
    SaiToh, Akira
    COMPUTER PHYSICS COMMUNICATIONS, 2013, 184 (08) : 2005 - 2020
  • [7] Quantum plus plus : A modern C plus plus quantum computing library
    Gheorghiu, Vlad
    PLOS ONE, 2018, 13 (12):
  • [8] An improved C plus plus Poisson series processor with its applications
    Lopez Orti, Jose Antonio
    Agost Gomez, Vicente
    Barreda Rochera, Miguel
    COMPUTATIONAL AND MATHEMATICAL METHODS, 2021, 3 (06)
  • [9] Cosmo plus plus : An object-oriented C plus plus library for cosmology
    Aslanyan, Grigor
    COMPUTER PHYSICS COMMUNICATIONS, 2014, 185 (12) : 3215 - 3227
  • [10] Infosel plus plus : Information Based Feature Selection C plus plus Library
    Kachel, Adam
    Biesiada, Jacek
    Blachnik, Marcin
    Duch, Wlodzislaw
    ARTIFICIAL INTELLIGENCE AND SOFT COMPUTING, PT I, 2010, 6113 : 388 - +