5#include <boost/callable_traits/args.hpp>
6#include <boost/callable_traits/return_type.hpp>
7#include <boost/mp11/algorithm.hpp>
12namespace proto_convert_details {
18 static constexpr const T value{};
27template <
typename SdkType>
33template <
typename ProtoType>
39template <
typename Callable>
40using ProtoArgType = std::remove_pointer_t<
41 boost::mp11::mp_back<boost::callable_traits::args_t<Callable, boost::mp11::mp_list>>>;
45 template <
typename SdkType>
46 auto operator()(
const SdkType& t)
const {
47 using ProtoReturnType = ProtoArgType<to_proto<SdkType>>;
50 to_proto<SdkType>{}(t, &ret);
58 template <
typename ProtoType>
59 auto operator()(
const ProtoType& proto)
const {
60 return from_proto<ProtoType>{}(&proto);
73constexpr auto& to_proto =
79constexpr auto& from_proto =
88template <
typename SdkType>
89using EquivalentApiType =
90 proto_convert_details::ProtoArgType<proto_convert_details::to_proto<SdkType>>;
94template <
typename ApiType>
95using EquivalentSdkType =
96 boost::callable_traits::return_type_t<proto_convert_details::from_proto<ApiType>>;
Definition proto_convert.hpp:57
Definition proto_convert.hpp:34
Definition proto_convert.hpp:17
Definition proto_convert.hpp:44
Definition proto_convert.hpp:28