diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2024-03-03 18:01:11 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2024-03-04 06:58:15 +0100 |
commit | a73f01a0cbedc578b169b4c74910dcde072d8451 (patch) | |
tree | fc4e051fff2826ab26637387be961aedcb427dfa /compat/debug.cpp | |
parent | ff8b35d8874ff6377b6a0aad494da46028668ac0 (diff) |
compat/debug: allow Debug{&cerr} without <iostream>
Diffstat (limited to 'compat/debug.cpp')
-rw-r--r-- | compat/debug.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/compat/debug.cpp b/compat/debug.cpp index 2b900180..d7a28289 100644 --- a/compat/debug.cpp +++ b/compat/debug.cpp @@ -2,8 +2,10 @@ #include "compat/strerror.hpp" #include <cerrno> #include <cstdio> +#include <iostream> #include <Corrade/Containers/StringView.h> + // Error{} << "error" << colon() << "can't open file" << colon() << quoted("foo") << error_string(EINVAL); // ===> "error: can't open file 'foo': Invalid argument" @@ -64,6 +66,9 @@ Debug& operator<<(Debug& dbg, Fraction f) namespace floormat { +std::ostream* standard_output() { return &std::cout; } +std::ostream* standard_error() { return &std::cerr; } + using namespace floormat::detail::corrade_debug; Colon colon(char c) { return Colon{c}; } |