Improvements to STParsedJSON:

* Cleanups and reduction of copying
* Add STArray::back, operator[], push_back(&&)
* Add make_stvar
* Rework STParsedJSON
* Fix code and unit tests that use STParsedJSON
* STTx move constructor
This commit is contained in:
JoelKatz
2015-04-23 10:32:51 -07:00
committed by Nik Bougalis
parent 5a7fa8cfa9
commit 4244e1070d
13 changed files with 152 additions and 132 deletions

View File

@@ -88,7 +88,14 @@ public:
STBase const& operator*() const { return get(); }
STBase const* operator->() const { return &get(); }
template <class T, class... Args>
friend
STVar
make_stvar(Args&&... args);
private:
STVar() = default;
STVar (SerializedTypeID id, SField const& name);
void destroy();
@@ -113,6 +120,16 @@ private:
}
};
template <class T, class... Args>
inline
STVar
make_stvar(Args&&... args)
{
STVar st;
st.construct<T>(std::forward<Args>(args)...);
return std::move(st);
}
inline
bool
operator== (STVar const& lhs, STVar const& rhs)