* SPDX-License-Identifier: MIT
*/
-#include "common/common.h"
-#include "cpp-common/bt2/message.hpp"
+#ifndef BABELTRACE_CPP_COMMON_BT2C_FMT_HPP
+#define BABELTRACE_CPP_COMMON_BT2C_FMT_HPP
+
#include "cpp-common/vendor/fmt/format.h" /* IWYU pragma: keep */
#include "cpp-common/vendor/wise-enum/wise_enum.h"
template <typename T>
using EnableIfIsWiseEnum =
- typename std::enable_if<wise_enum::is_wise_enum<T>::value, const char *>::type;
+ typename std::enable_if<wise_enum::is_wise_enum<T>::value, wise_enum::string_type>::type;
} /* namespace internal */
return wise_enum::to_string<T>(val);
}
-inline const char *format_as(const MessageType type)
-{
- return bt_common_message_type_string(static_cast<bt_message_type>(type));
-}
-
} /* namespace bt2 */
namespace bt2c {
}
} /* namespace bt2c */
+
+#endif /* BABELTRACE_CPP_COMMON_BT2C_FMT_HPP */