hyperledger/iroha
Iroha - A simple, decentralized ledger http://iroha.tech
common.hpp
Go to the documentation of this file.
1 
6 #ifndef IROHA_COMMON_HPP
7 #define IROHA_COMMON_HPP
8 
9 #include <memory>
10 #include <boost/optional.hpp>
11 
12 namespace iroha {
13  namespace model {
14  // Optional over shared pointer
15  template <typename T>
16  using optional_ptr = boost::optional<std::shared_ptr<T>>;
17 
18  template <typename T, typename... Args>
20  return std::make_shared<T>(std::forward<Args>(args)...);
21  }
22  } // namespace model
23 } // namespace iroha
24 
25 #endif // IROHA_COMMON_HPP
optional_ptr< T > make_optional_ptr(Args &&...args)
Definition: common.hpp:19
boost::optional< std::shared_ptr< T >> optional_ptr
Definition: common.hpp:16
Definition: block_query.hpp:16