#Count every usage of arithmetic/mathematic functions
- Status:
- Ready for test use.
Key features:
- Headers only
- No third parties
- No additional binaries
- One file to include to start the fun
- Easy to integrate
- Easy to disintegrate
- Out of the box ready
- No need to recompile or start some install process.
Example:
#include <iostream>
#include <iomanip>
#include "counter/counter.hpp"
typedef ::counter::number<double> MyDouble;
int main( int argc, char *argv[] )
{
MyDouble a, b, c;
a = a + b + - c;
std::cout << "Number of calls of assignment operator: "
<< MyDouble::statistics()[ ::counter::constant::operator_assign ]
<< std::endl
<< "Number of calls of binary plus operator: "
<< MyDouble::statistics()[ ::counter::constant::operator_plus_binary ]
<< std::endl
<< "Number of calls of unary minus: "
<< MyDouble::statistics()[ ::counter::constant::operator_minus_unary ]
<< std::endl;
return EXIT_SUCCESS;
}
Want to see more: