Header file shared_memory.hpp

namespace eosio
{
    template <typename T>
    struct shared_memory;

    template <typename Stream>
    datastream<Stream>& operator>>(datastream<Stream>& ds, shared_memory<datastream<Stream>>& dest);

    template <typename Stream1, typename Stream2>
    datastream<Stream1>& operator<<(datastream<Stream1>& ds, shared_memory<datastream<Stream2>> const& obj);

    template <typename Stream>
    datastream<Stream>& operator>>(datastream<Stream>& ds, shared_memory<std::string_view>& dest);

    template <typename Stream>
    datastream<Stream>& operator<<(datastream<Stream>& ds, shared_memory<std::string_view> const& obj);
}

Struct eosio::shared_memory

template <typename T>
struct shared_memory
{
    T value = {};

    T& operator*();

    T const& operator*() const;

    T* operator->();

    T const* operator->() const;
};

Tag objects which share memory with streams or with other things. These reduce deserialization overhead, but require the source memory isn’t freed and remains untouched.


results matching ""

    No results matching ""