Kagome
Polkadot Runtime Engine in C++17
tie.hpp File Reference
#include <tuple>
Include dependency graph for tie.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 scale
 

Macros

#define SCALE_TIE(N)
 

Functions

template<typename T , typename F , size_t N = std::remove_reference_t<T>::scale_tie>
auto scale::as_tie (T &&v, F &&f)
 
template<typename T , size_t = T::scale_tie>
ScaleEncoderStream & scale::operator<< (ScaleEncoderStream &s, const T &v)
 
template<typename T , size_t = T::scale_tie>
ScaleDecoderStream & scale::operator>> (ScaleDecoderStream &s, T &v)
 

Macro Definition Documentation

#define SCALE_TIE (   N)
Value:
static constexpr size_t scale_tie = N; \
template <typename T> \
bool operator==(const T &r) const { \
using ThisT = std::decay_t<decltype(*this)>; \
using ExtT = std::decay_t<T>; \
static_assert( \
std::is_same_v<ExtT, ThisT> || std::is_base_of_v<ThisT, ExtT>); \
return ::scale::as_tie(*this, [&](auto l) { \
return ::scale::as_tie(r, [&](auto r) { return l == r; }); \
}); \
} \
template <typename T> \
bool operator!=(const T &r) const { \
return !operator==(r); \
}
bool operator==(const Unused< N > &, const Unused< N > &)
Definition: unused.hpp:27
auto as_tie(T &&v, F &&f)
Definition: tie.hpp:36

Copyright Soramitsu Co., Ltd. All Rights Reserved. SPDX-License-Identifier: Apache-2.0

Definition at line 11 of file tie.hpp.