eoserial:: const correctness for String.

This commit is contained in:
Benjamin Bouvier 2013-03-15 19:17:40 +01:00 committed by LPTK
commit f3e91e17f1

View file

@ -62,7 +62,7 @@ namespace eoserial
* @param value The value in which we're writing. * @param value The value in which we're writing.
*/ */
template<class T> template<class T>
inline void deserialize( T & value ); inline void deserialize( T & value ) const;
protected: protected:
// Copy and reaffectation are forbidden // Copy and reaffectation are forbidden
@ -80,7 +80,7 @@ namespace eoserial
* invoking. * invoking.
*/ */
template<class T> template<class T>
inline void String::deserialize( T & value ) inline void String::deserialize( T & value ) const
{ {
std::stringstream ss; std::stringstream ss;
ss.precision(std::numeric_limits<double>::digits10 + 1); ss.precision(std::numeric_limits<double>::digits10 + 1);
@ -93,7 +93,7 @@ namespace eoserial
* a stringstream. * a stringstream.
*/ */
template<> template<>
inline void String::deserialize( std::string & value ) inline void String::deserialize( std::string & value ) const
{ {
value = *this; value = *this;
} }