
25 May
2010
25 May
'10
7:14 p.m.
On 25.05.2010 22:20, Artyom wrote:
Also, there is the mbsinit function that allows to detect if the state has the initial value (just in case there are other initial values, other than zero-filled).
I can't really relay on mbsinit as they not available in on CRTL's
This function is standard C. It should be present in any CRTL.
and further on, in the paragraph 5 (regarding do_unshift), there is a footnote that explains that the method is intended to return the state to the initial value (typically, stateT()).
That is probably the most misleading point.
If state is POD then stateT() does nothing!
It is called value-initialization and it zeroes the POD value.