diff --git a/include/rexy/debug_print.hpp b/include/rexy/debug_print.hpp index 54447a1..c526224 100644 --- a/include/rexy/debug_print.hpp +++ b/include/rexy/debug_print.hpp @@ -79,8 +79,6 @@ print_succ& operator=(print_succ&&) = delete; }; template - print_succ(Args&&...) -> print_succ; - template struct print_info{ explicit print_info(Args&&... args, const rexy::source_location& loc = rexy::source_location::current()){ std::fprintf(stderr, "%s", detail::color_blue); @@ -94,8 +92,6 @@ print_info& operator=(print_info&&) = delete; }; template - print_info(Args&&...) -> print_info; - template struct print_warn{ explicit print_warn(Args&&... args, const rexy::source_location& loc = rexy::source_location::current()){ std::fprintf(stderr, "%s", detail::color_yellow); @@ -109,8 +105,6 @@ print_warn& operator=(print_warn&&) = delete; }; template - print_warn(Args&&...) -> print_warn; - template struct print_error{ explicit print_error(Args&&... args, const rexy::source_location& loc = rexy::source_location::current()){ std::fprintf(stderr, "%s", detail::color_red); @@ -123,32 +117,77 @@ print_error& operator=(const print_error&) = delete; print_error& operator=(print_error&&) = delete; }; - template - print_error(Args&&...) -> print_error; #else template - using print_succ = print; + class print_succ : public print{ + public: + using print::print; + }; template - using print_info = print; + class print_info : public print{ + public: + using print::print; + }; template - using print_warn = print; + class print_warn : public print{ + public: + using print::print; + }; template - using print_error = print; + class print_error : public print{ + public: + using print::print; + }; #endif //REXY_ENABLE_COLOR_DEBUG + template + print_warn(Args&&...) -> print_warn; + template + print_error(Args&&...) -> print_error; + template + print_info(Args&&...) -> print_info; + template + print_succ(Args&&...) -> print_succ; #ifdef REXY_ENABLE_DEBUG_VERBOSE_OUTPUT namespace verbose{ template - using print = rexy::debug::print; + class print : public ::rexy::debug::print{ + public: + using ::rexy::debug::print::print; + }; template - using print_succ = rexy::debug::print_succ; + class print_succ : public ::rexy::debug::print_succ{ + public: + using ::rexy::debug::print_succ::print_succ; + }; template - using print_info = rexy::debug::print_info; + class print_info : public ::rexy::debug::print_info{ + public: + using ::rexy::debug::print_info::print_info; + }; template - using print_warn = rexy::debug::print_warn; + class print_warn : public ::rexy::debug::print_warn{ + public: + using ::rexy::debug::print_warn::print_warn; + }; template - using print_error = rexy::debug::print_error; + class print_error : public ::rexy::debug::print_error{ + public: + using ::rexy::debug::print_error::print_error; + }; + template + print(Args&&...) -> print; + template + print_warn(Args&&...) -> print_warn; + template + print_error(Args&&...) -> print_error; + template + print_info(Args&&...) -> print_info; + template + print_succ(Args&&...) -> print_succ; + } + #else namespace verbose{ static constexpr inline void print(...){}