std::size_t Instantiation
<p>My first post, so please be kind  :)</p>

<p>This code snippet is from the Poco library project:</p>

<pre><code>void SyslogParser::parse(const std::string&amp; msg)
{
// &lt;int&gt; -&gt; int: lower 3 bits severity, upper bits: facility
std::size_t pos = 0;
RemoteSyslogChannel::Severity severity;
RemoteSyslogChannel::Facility fac;
parsePrio(msg, pos, severity, fac);

// the next field decide if we parse an old BSD message or a new syslog message
// BSD: expects a month value in string form: Jan, Feb...
// SYSLOG expects a version number: 1

if (Poco::Ascii::isDigit(msg[pos]))
{
    parseNew(msg, severity, fac, pos);
}
else
{
    parseBSD(msg, severity, fac, pos);
}
poco_assert (pos == msg.size());
}
</code></pre>

<p>I do not understand the role of std::size_t here.  I thought that std::size_t would create an object (uint32 or uint64 depending on platform, etc.) which could hold the size of some other object.  Is this understanding correct?</p>

<p>So what is happening here, then, is, we are creating an uint and (it appears) using it as a bitfield.  If I am understanding what is being done, then I have to ask why?  What is the advantage of producing an uint this way, as opposed to just declaring one?</p>

<p>Not questioning the author, just trying to understand what the advantage might be to take this route.  Is there a speed or efficiency benefit?</p>
