• DocumentCode
    555938
  • Title

    Extension of iterator traits in the C++ Standard Template Library

  • Author

    Pataki, Norbert ; Porkoláb, Zoltán

  • Author_Institution
    Dept. of Program. Languages & Compilers, Eotvos Lorand Univ., Budapest, Hungary
  • fYear
    2011
  • fDate
    18-21 Sept. 2011
  • Firstpage
    911
  • Lastpage
    914
  • Abstract
    The C++ Standard Template Library is the flagship example for libraries based on the generic programming paradigm. The usage of this library is intended to minimize classical C/C++ error, but does not warrant bug-free programs. Furthermore, many new kinds of errors may arise from the inaccurate use of the generic programming paradigm, like dereferencing invalid iterators or misunderstanding remove-like algorithms. In this paper we present typical scenarios, that can cause runtime problems. We emit warnings while these constructs are used without any modification in the compiler. We argue for an extension of the STL´s iterator traits in order to emit these warnings. We also present a general approach to emit “customized” warnings. We support the so-called believe-me marks to disable warnings.
  • Keywords
    C++ language; software libraries; C++ standard template library; bug-free programs; invalid iterators; iterator traits; programming paradigm; runtime problems; Algorithm design and analysis; Computer languages; Containers; Libraries; Programming; Runtime; Transforms;
  • fLanguage
    English
  • Publisher
    ieee
  • Conference_Titel
    Computer Science and Information Systems (FedCSIS), 2011 Federated Conference on
  • Conference_Location
    Szczecin
  • Print_ISBN
    978-1-4577-0041-5
  • Electronic_ISBN
    978-83-60810-35-4
  • Type

    conf

  • Filename
    6078248