Since McCabe’s cyclometric measure, structural complexity have been playing an important role measuring the complexity of programs. Complexity metrics are used to achieve more maintainable code with the least bugs possible. C++ Standard Template Library (STL) is the most popular library based on the generic programming paradigm. This paradigm allows implementation of algorithms and containers in an abstract way to ensure the configurability and collaboration of the abstract components. STL is widely used in industrial softwares because STL’s appropriate application decreases the complexity of the code significantly. Many new potential errors arise by the usage of the generic programming paradigm, including invalid iterators, notation of functors, etc. In this paper we present many complexity inconsistencies in the application of STL that a precise metric must take into account, but the existing measures ignore the characteristics of STL.
[1]
Paul Piwowarski,et al.
A nesting level complexity measure
,
1982,
SIGP.
[2]
Bjarne Stroustrup,et al.
The C++ Programming Language: Special Edition
,
2000
.
[3]
Anas N. Al-Rabadi,et al.
A comparison of modified reconstructability analysis and Ashenhurst‐Curtis decomposition of Boolean functions
,
2004
.
[4]
Rigorous definition and analysis of program complexity measures: An example using nesting
,
1989,
J. Syst. Softw..
[5]
Chris F. Kemerer,et al.
A Metrics Suite for Object Oriented Design
,
2015,
IEEE Trans. Software Eng..
[6]
Matthew Harold Austern,et al.
Generic programming and the STL
,
1998
.