2 * Copyright (c) 2024 EfficiOS, inc.
4 * SPDX-License-Identifier: MIT
7 #include "common/common.h"
8 #include "cpp-common/bt2/message.hpp"
9 #include "cpp-common/vendor/fmt/format.h" /* IWYU pragma: keep */
10 #include "cpp-common/vendor/wise-enum/wise_enum.h"
17 using EnableIfIsWiseEnum =
18 typename std::enable_if<wise_enum::is_wise_enum<T>::value, const char *>::type;
20 } /* namespace internal */
25 ::internal::EnableIfIsWiseEnum<T> format_as(const T val) noexcept
27 return wise_enum::to_string<T>(val);
30 inline const char *format_as(const MessageType type)
32 return bt_common_message_type_string(static_cast<bt_message_type>(type));
40 ::internal::EnableIfIsWiseEnum<T> format_as(const T val) noexcept
42 return wise_enum::to_string<T>(val);
45 inline std::string format_as(const UuidView uuid)
50 } /* namespace bt2c */