Loading...
Searching...
No Matches
pmt_fmt.h
Go to the documentation of this file.
/* -*- c++ -*- */
/*
* Copyright 2023 Marcus Müller
*
* This file is part of GNU Radio
*
* SPDX-License-Identifier: GPL-3.0-or-later
*
*/
#ifndef INCLUDED_GNURADIO_PMT_FMT_H
#define INCLUDED_GNURADIO_PMT_FMT_H
/* ensure that tweakme.h is included before the bundled spdlog/fmt header, see
* https://github.com/gabime/spdlog/issues/2922 */
#include <spdlog/tweakme.h>
#include <gnuradio/api.h>
#include <pmt/pmt.h>
#include <spdlog/fmt/fmt.h>
#include <string_view>
//!\brief enables PMTs to be formatted with fmt
template <>
struct GR_RUNTIME_API fmt::formatter<pmt::pmt_t> : formatter<std::string_view> {
fmt::format_context::iterator format(const pmt::pmt_t& obj,
format_context& ctx) const;
};
#endif
api.h
GR_RUNTIME_API
#define GR_RUNTIME_API
Definition gnuradio-runtime/include/gnuradio/api.h:18
pmt::pmt_t
std::shared_ptr< pmt_base > pmt_t
typedef for shared pointer (transparent reference counting).
Definition pmt.h:83
pmt.h
fmt::formatter< pmt::pmt_t >::format
fmt::format_context::iterator format(const pmt::pmt_t &obj, format_context &ctx) const