Open felixaszx opened 2 years ago
Add a new macro that can support function-like call for hue namespace
#define color(operation,content) operation << content << hue::reset std::cout<<color(hue::red, "Hello world!"); //(color red) std::cout<<color(hue::red, "Hello world!") << "just kidding"; //first one color red std::cout<<color(hue::red, "Hello world!" << "just kidding") ; //2 string color red
all three work, everything outside of the color macro will be reset to original, because this macro call hue::reset after all operation
hue::reset
You can just add that macro to the .hpp file
Add a new macro that can support function-like call for hue namespace
all three work, everything outside of the color macro will be reset to original, because this macro call
hue::reset
after all operation