@ -23,11 +23,6 @@ T from_json(const js::Value& v);
template<classT>
js::Valueto_json(constT&t);
template<classT>
js::Valueto_json(constOut<T>&t);
// helper classes to specify in- and out-parameters
template<classT>
@ -40,8 +35,7 @@ struct In
~In();
In(constIn<T>&other)=delete;
In(In<T>&&victim);
In(In<T>&&victim)=delete;
In<T>&operator=(constIn<T>&)=delete;
// default implementation:
@ -69,7 +63,7 @@ struct InRaw
~InRaw()=default;
InRaw(constInRaw<T>&other)=delete;
InRaw(InRaw<T>&&victim);
InRaw(InRaw<T>&&victim)=delete;
InRaw<T>&operator=(constInRaw<T>&)=delete;
// default implementation:
@ -127,7 +121,7 @@ struct Out
~Out();
Out(constOut<T>&other)=delete;
Out(Out<T>&&victim);
Out(Out<T>&&victim)=delete;
// just to be sure they are not implicitly defined:
Out<T>&operator=(constOut<T>&other)=delete;
@ -149,7 +143,8 @@ struct Out
{
o<<(constvoid*)&out;
if(&out)
// the if() was added to avoid crashes on memory corruptuon. But clang++ warns, that this check is always true on "well-formed" programs, and he is right. In an ideal world there are no memory corruptions. ;-(