GNU Radio Manual and C++ API Reference  3.10.9.1
The Free & Open Software Radio Ecosystem
pmt_fmt.h
Go to the documentation of this file.
1 /* -*- c++ -*- */
2 /*
3  * Copyright 2023 Marcus Müller
4  *
5  * This file is part of GNU Radio
6  *
7  * SPDX-License-Identifier: GPL-3.0-or-later
8  *
9  */
10 #ifndef INCLUDED_GNURADIO_PMT_FMT_H
11 #define INCLUDED_GNURADIO_PMT_FMT_H
12 /* ensure that tweakme.h is included before the bundled spdlog/fmt header, see
13  * https://github.com/gabime/spdlog/issues/2922 */
14 #include <spdlog/tweakme.h>
15 
16 #include <gnuradio/api.h>
17 #include <pmt/pmt.h>
18 #include <spdlog/fmt/fmt.h>
19 #include <string_view>
20 
21 //!\brief enables PMTs to be formatted with fmt
22 template <>
23 struct GR_RUNTIME_API fmt::formatter<pmt::pmt_t> : formatter<std::string_view> {
24  fmt::format_context::iterator format(const pmt::pmt_t& obj,
25  format_context& ctx) const;
26 };
27 #endif
#define GR_RUNTIME_API
Definition: gnuradio-runtime/include/gnuradio/api.h:18
std::shared_ptr< pmt_base > pmt_t
typedef for shared pointer (transparent reference counting).
Definition: pmt.h:83
enables PMTs to be formatted with fmt
Definition: io_signature.h:194
fmt::format_context::iterator format(const pmt::pmt_t &obj, format_context &ctx) const