#pragma once
#include "datastream.hpp"
namespace eosio {
template <typename T>
struct [[eosio::ignore]] ignore {};
template <typename T>
struct ignore_wrapper {
constexpr ignore_wrapper() {}
constexpr ignore_wrapper(T val) : value(val) {}
constexpr ignore_wrapper(ignore<T> val) {}
constexpr inline T get() { return value; }
constexpr operator T() { return value; }
constexpr operator ignore<T>() { return {}; }
T value;
};
template<typename DataStream, typename T>
inline DataStream& operator<<(DataStream& ds, const ::eosio::ignore_wrapper<T>& val) {
ds << val.value;
return ds;
}
template<typename DataStream, typename T>
inline DataStream& operator<<(DataStream& ds, const ::eosio::ignore<T>& val) {
return ds;
}
template<typename DataStream, typename T>
inline DataStream& operator>>(DataStream& ds, ::eosio::ignore<T>&) {
return ds;
}
}