From 3e5cf3400273b0e4f8f96a3a87d2b9e57574eeec Mon Sep 17 00:00:00 2001 From: David Robillard Date: Tue, 16 Aug 2022 16:44:29 -0400 Subject: Upgrade to fmt 9.0.0 This library tends to break in annoying ways like this, so pin the major version to 9 to hopefully avoid these problems in the future. --- src/SignalDirection.hpp | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'src/SignalDirection.hpp') diff --git a/src/SignalDirection.hpp b/src/SignalDirection.hpp index 3d499a4..84c3cc2 100644 --- a/src/SignalDirection.hpp +++ b/src/SignalDirection.hpp @@ -4,6 +4,15 @@ #ifndef PATCHAGE_SIGNALDIRECTION_HPP #define PATCHAGE_SIGNALDIRECTION_HPP +#include "warnings.hpp" + +PATCHAGE_DISABLE_FMT_WARNINGS +#include +#include +PATCHAGE_RESTORE_WARNINGS + +#include + namespace patchage { enum class SignalDirection { @@ -12,6 +21,24 @@ enum class SignalDirection { duplex, }; +inline std::ostream& +operator<<(std::ostream& os, const SignalDirection direction) +{ + switch (direction) { + case SignalDirection::input: + return os << "input"; + case SignalDirection::output: + return os << "output"; + case SignalDirection::duplex: + return os << "duplex"; + } + + PATCHAGE_UNREACHABLE(); +} + } // namespace patchage +template<> +struct fmt::formatter : fmt::ostream_formatter {}; + #endif // PATCHAGE_SIGNALDIRECTION_HPP -- cgit v1.2.1