Your problem generalises to anything &quot;streamy&quot;<br><br>Going way back to the old C way of doing things<br>&nbsp;FILE * f;<br>&nbsp;fprintf(f, fmt, stuff);<br><br>You&#39;d expect that to work, even if you copied from from inside a const struct, right? But then the type of f would have to change to
<br><br>&nbsp;const FILE * f; <br><br>which is C-speak for &quot;f is a const pointer to mutable FILE&quot;. Now throwing in transitivity would stop it all working.<br><br>Moving forward in time to the modern era of objects, in general, you would want:
<br><br>&nbsp;stream.write(x);<br><br>to work even if the variable &quot;stream&quot; was const. (That is, if the /reference/ was const, not the data which is pointed to by the reference). The stack variable can be const, but the heap data needs to be mutable.
<br><br>I don&#39;t have a solution, except to agree that &quot;head const&quot; does seem to be required after all.<br>