20 #ifndef RIPPLE_PROTOCOL_STVAR_H_INCLUDED
21 #define RIPPLE_PROTOCOL_STVAR_H_INCLUDED
23 #include <ripple/protocol/SField.h>
24 #include <ripple/protocol/STBase.h>
25 #include <ripple/protocol/Serializer.h>
112 template <
class T,
class... Args>
124 template <
class T,
class... Args>
129 p_ =
new T(std::forward<Args>(args)...);
131 p_ =
new (&
d_) T(std::forward<Args>(args)...);
137 return static_cast<void const*
>(
p_) !=
static_cast<void const*
>(&
d_);
141 template <
class T,
class... Args>
146 st.
construct<T>(std::forward<Args>(args)...);
159 return !(lhs == rhs);
defaultObject_t()=default
static constexpr std::size_t max_size
nonPresentObject_t()=default
defaultObject_t defaultObject
STVar & operator=(STVar const &rhs)
virtual bool isEquivalent(STBase const &t) const
STBase const * operator->() const
virtual STBase * copy(std::size_t n, void *buf) const
STBase const & operator*() const
friend STVar make_stvar(Args &&... args)
bool operator==(STVar const &lhs, STVar const &rhs)
std::aligned_storage< max_size >::type d_
nonPresentObject_t nonPresentObject
void construct(Args &&... args)
STVar make_stvar(Args &&... args)
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
bool operator!=(STVar const &lhs, STVar const &rhs)
A type which can be exported to a well known binary format.
virtual STBase * move(std::size_t n, void *buf)
STBase const & get() const