C++ size aware data type/parameter
<p>I am not sure, but I think I have once seen a method signature that looked like this (in the constructors):</p>

<pre><code>class Buffer {
    Buffer(char_with_size *data) { ... };
    Buffer(char *data, size_t len) { ... };
};
</code></pre>

<p>In the first constructor call an array/pointer parameter can passed of which the compiler automatically knows its size. So, I always know the size of the char buffer passed.</p>

<p>Does anyone know if this really exists in c++?</p>
