20 #ifndef RIPPLE_PROTOCOL_STVAR_H_INCLUDED
21 #define RIPPLE_PROTOCOL_STVAR_H_INCLUDED
23 #include <ripple/protocol/Serializer.h>
24 #include <ripple/protocol/SField.h>
25 #include <ripple/protocol/STBase.h>
86 template <
class T,
class... Args>
98 template <
class T,
class... Args>
103 p_ =
new T(std::forward<Args>(args)...);
105 p_ =
new(&
d_) T(std::forward<Args>(args)...);
111 return static_cast<void const*
>(
p_) !=
112 static_cast<void const*
>(&
d_);
116 template <
class T,
class... Args>
122 st.
construct<T>(std::forward<Args>(args)...);
137 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
STBase const & operator*() const
friend STVar make_stvar(Args &&... args)
bool operator==(STVar const &lhs, STVar const &rhs)
virtual STBase * move(std::size_t n, void *buf)
virtual STBase * copy(std::size_t n, void *buf) const
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.
STBase const & get() const