6 #ifndef IROHA_REFERENCE_HOLDER_HPP 7 #define IROHA_REFERENCE_HOLDER_HPP 9 #include <boost/variant.hpp> 20 using VariantType = boost::variant<T, T &>;
41 return &boost::apply_visitor(
42 [](
auto &value) -> decltype(
auto) {
return (value); }, variant_);
54 return &boost::apply_visitor(
55 [](
const auto &value) -> decltype(
auto) {
return (value); },
65 #endif // IROHA_REFERENCE_HOLDER_HPP ReferenceHolder(V &&value)
Definition: reference_holder.hpp:24
ReferenceType operator*()
Definition: reference_holder.hpp:32
Definition: reference_holder.hpp:18
ConstPointerType operator->() const
Definition: reference_holder.hpp:49
typename std::add_lvalue_reference_t< const iroha::protocol::Peer > ConstReferenceType
Definition: reference_holder.hpp:29
ConstPointerType ptr() const
Definition: reference_holder.hpp:53
PointerType ptr()
Definition: reference_holder.hpp:40
PointerType operator->()
Definition: reference_holder.hpp:36
ConstReferenceType operator*() const
Definition: reference_holder.hpp:45
typename std::add_pointer_t< iroha::protocol::Peer > PointerType
Definition: reference_holder.hpp:27
typename std::add_pointer_t< const iroha::protocol::Peer > ConstPointerType
Definition: reference_holder.hpp:30
typename std::add_lvalue_reference_t< iroha::protocol::Peer > ReferenceType
Definition: reference_holder.hpp:26
Definition: command_executor.hpp:12