- void read( std::string::iterator& it, T& val ) {
- char* data = ( char* ) &val;
+ static void read( std::string::const_iterator& it, T& val ) {
+ union typeConversion {
+ char buf[sizeof( T )];
+ T value;
+
+ typeConversion( const T& v ) : value( v ) {}
+ };
+
+ typeConversion data( 0 );