C++ Extension functions?
<p>Are there extensions for C++ like there are in C#?</p>

<p>For example in C# you can do:</p>

<pre><code>public static uint SwapEndian(this uint value)
{
    var tmp = BitConverter.GetBytes(value);
    Array.Reverse(tmp);
    return BitConverter.ToUInt32(tmp, 0);
}

someuint.SwapEndian();
</code></pre>

<p>Is there anything like that in C++?</p>
