Added webserver, parse args, A1066

This commit is contained in:
2023-03-22 06:45:51 +05:00
parent dc9a742471
commit 4f74b0a1b8
9 changed files with 272 additions and 68 deletions

24
inc/macros.hpp Normal file
View File

@ -0,0 +1,24 @@
#include "colors.hpp"
#ifndef BIT_MACROS_HPP
#define BIT_MACROS_HPP
#define INFO(...) std::cout , "[INFO] " , __VA_ARGS__ , std::endl;
#define WARN(...) std::cout , YELLOW , "[WARN] " , __VA_ARGS__ , RESET , std::endl;
#define ERR(...) std::cout , RED , "[ERROR] " , __VA_ARGS__ , RESET , std::endl;
#define CRIT(...) std::cout , BOLD , RED , "[CRIT] " , __VA_ARGS__ , RESET , std::endl;
template <typename T>
std::ostream& operator,(std::ostream& out, const T& t) {
out << t;
return out;
}
//overloaded version to handle all those special std::endl and others...
std::ostream& operator,(std::ostream& out, std::ostream&(*f)(std::ostream&)) {
out << f;
return out;
}
#endif //BIT_MACROS_HPP