This is a repo which contains many useful CPP headers. Current functions or tools:
A simple utility class helps track the run time of functions or whole program.
#include "timer.h"
Timer timer(std::cout, "message") //Initialize an instance
timer.span() //Compute the time from the initialization to currentEmpty string is the default value of the second argument.
This header currently support both linux and windows platform. The implementation of this file is inspired from doctest
#include "color.h"
std::cout << Color::Cyan << "Hello world!" << std::endl; // Set the color of text to Cyan
std::cout << Color::None; // Reset to default colorSupported colors are listed as below:
Color::Red
Color::Green
Color::Blue
Color::Cyan
Color::Yellow
Color::Grey
Color::LightGrey
Color::BrightRed
Color::BrightGreen
Color::BrightWhite
Color::None // Reset the color