#include <s11nlite.hpp>
Public Member Functions | |
save_nullary_base_f (T const &src, OutputT dest) | |
Both src and dest are expected to outlive this object, unless of source OutputT is a value type, in which case we copy dest at ctor time, instead of taking a (const &), to avoid us accidentally storing a reference to a temporary which probably won't exist when operator() is called. | |
bool | operator() () const |
Returns s11nlite::save( this->source, this->destination ). | |
Public Attributes | |
T const & | source |
OutputT | destination |
It is not intended for standalone use, but as a base type for save_xxx_nullary_f functors.
T must be one of:
OutputT is expected to be one of:
If s11nlite::save() is ever overloaded, e.g., to take your own custom output destination type, then that type will also theoretically work here
See save() for important notes about when you should NOT use this. In particular, this functor should not normally be used with std::for_each(), as save() expects to store ONE object in each target. Loading objects saved this way won't work: only the first one is likely to be read by load-time. Exceptions to this caveat include network streams or debug channels.
Added in version 1.1.3.
Definition at line 568 of file s11nlite.hpp.
|
Both src and dest are expected to outlive this object, unless of source OutputT is a value type, in which case we copy dest at ctor time, instead of taking a (const &), to avoid us accidentally storing a reference to a temporary which probably won't exist when operator() is called.
Definition at line 580 of file s11nlite.hpp. |
|
Returns s11nlite::save( this->source, this->destination ).
Definition at line 586 of file s11nlite.hpp. |
|
Definition at line 571 of file s11nlite.hpp. |
|
Definition at line 570 of file s11nlite.hpp. |