
On Wed, Aug 24, 2011 at 22:22, Olaf van der Spek <ml@vdspek.org> wrote:
On Wed, Aug 24, 2011 at 5:27 PM, Yakov Galka <ybungalobill@gmail.com> wrote:
2) Yes, it treats string literals as arrays, so what? It's exactly what we want.
No, because it'll include the null terminator. [...] end() will point one past the terminator.
The two are exactly opposite. So do you want to include the null in the range or not? Yes, my mistake. When I said 'end() points to' I meant 'end()-1 points to'.
If you're talking about including or not the null terminator, then I'm still
not sure on this point. We can say that our strings don't contain zeros in the middle (which is acceptable for function expecting const char*), then if
It'd be nice to support 'binary' strings too.
I remember that you brought up this topic some time ago. However I don't think that you need anything special to handle binary chunks of data: typedef iterator_range<const char*> data_ref; Unlike for str_ref, this *is* a complete, working implementation. -- Yakov