friend bool operator < (const asset& a, const asset& b) { EOS_ASSERT(a.get_symbol() == b.get_symbol(), asset_type_exception, "logical operation between two different asset is not allowed"); return std::tie(a.amount,a.get_symbol()) < std::tie(b.amount,b.get_symbol()); }
friend asset operator + (const asset& a, const asset& b) { EOS_ASSERT(a.get_symbol() == b.get_symbol(), asset_type_exception, "addition between two different asset is not allowed"); return asset(a.amount + b.amount, a.get_symbol()); }
friend bool operator == (const asset& a, const asset& b) { return std::tie(a.get_symbol(), a.amount) == std::tie(b.get_symbol(), b.amount); }