
28 Jul
2009
28 Jul
'09
3:09 p.m.
Andrei Alexandrescu <andrei <at> metalanguage.com> writes:
During the talk, he mentioned that of course the problem would have been obviated if the APIs used a little abstraction that packaged the pointer and the size together.
for what it worth I came to exactly the same conclusion while ago and introduced basic_cstring template (in Boost.Test code and in all my day life projects), which is is tiny abstract that wraps two pointers or pointer and size to model any buffers in C like interfaces. I must say it's still one of the most useful little thing I am using in my code. Gennadiy