I don't think it's completely valid.
Care must be taken with string and binary data because it uses internally char type and char depends in the implementation if it is defined as unsigned or signed type. I prefer to use basic_string and be sure of what i'm reading.