From 8f3c494e3d89cd146f4e032ae94ce5456328c87e Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sat, 25 Nov 2023 18:59:10 +0100 Subject: a --- compat/debug.hpp | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 compat/debug.hpp (limited to 'compat/debug.hpp') diff --git a/compat/debug.hpp b/compat/debug.hpp new file mode 100644 index 00000000..1d8e4676 --- /dev/null +++ b/compat/debug.hpp @@ -0,0 +1,26 @@ +#pragma once +#include +#include + +namespace floormat::detail::corrade_debug { + +template struct Quoted final { const T& value; }; + +#ifndef FM_NO_CORRADE_DEBUG_EXTERN_TEMPLATE_QUOTED +extern template struct Quoted; +#endif + +Debug::Flags debug1(Debug& dbg); +Debug& debug2(Debug& dbg, Debug::Flags flags); + +template +Debug& operator<<(Debug& dbg, detail::corrade_debug::Quoted box) +{ + Debug::Flags flags = detail::corrade_debug::debug1(dbg); + dbg << box.value; + return debug2(dbg, flags); +} + +} // namespace floormat::detail::corrade_debug + +template floormat::detail::corrade_debug::Quoted quoted(const T& value) { return { value }; } -- cgit v1.2.3