Files
Cpp-in-Embedded-Systems/Chapter18/cib/libs/cib/detail/exports.hpp
Amar Mahmutbegovic 8634accda5 add Chapter18
2025-02-06 00:19:59 +01:00

26 lines
630 B
C++

#pragma once
#include <cib/detail/config_item.hpp>
#include <cib/detail/extend.hpp>
#include <stdx/tuple.hpp>
namespace cib::detail {
template <typename ServiceT, typename BuilderT> struct service_entry {
using Service = ServiceT;
BuilderT builder;
};
template <typename... Services> struct exports : public detail::config_item {
[[nodiscard]] constexpr auto
extends_tuple() const -> stdx::tuple<extend<Services>...> {
return {extend<Services>{}...};
}
[[nodiscard]] constexpr auto
exports_tuple() const -> stdx::tuple<Services...> {
return {};
}
};
} // namespace cib::detail