Re: [boost] Re: Re: char[] support in Boost.Range

In-Reply-To: <d6dhiu$hai$1@sea.gmane.org> technews@kangaroologic.com (Jonathan Turkanis) wrote (abridged):
Are we going to generalise it to allow any (compile-time constant) terminator?
Why does the terminator have to be a compile-time constant?
I was hesitant about suggesting a generalisation which added run-time overhead over only supporting '\0'. Also, the need is not very common in my experience. -- Dave Harris, Nottingham, UK.

"Dave Harris" <brangdon@cix.compulink.co.uk> wrote in message news:memo.187862@cix.compulink.co.uk...
In-Reply-To: <d6dhiu$hai$1@sea.gmane.org> technews@kangaroologic.com (Jonathan Turkanis) wrote (abridged):
Are we going to generalise it to allow any (compile-time constant) terminator?
Why does the terminator have to be a compile-time constant?
I was hesitant about suggesting a generalisation which added run-time overhead over only supporting '\0'.
Also, the need is not very common in my experience.
I see. Jonathan

"Dave Harris" <brangdon@cix.compulink.co.uk> wrote in message news:memo.187862@cix.compulink.co.uk... | In-Reply-To: <d6dhiu$hai$1@sea.gmane.org> | technews@kangaroologic.com (Jonathan Turkanis) wrote (abridged): | > > Are we going to generalise it to allow any (compile-time constant) | > > terminator? | > | > Why does the terminator have to be a compile-time constant? | | I was hesitant about suggesting a generalisation which added run-time | overhead over only supporting '\0'. can you back that up with performance measurements? (I would expect good compilers to completely remove the overhead; C++0x compiles are likely to guarantee this) -Thorsten

Thorsten Ottosen wrote:
"Dave Harris" wrote in message
(Jonathan Turkanis) wrote (abridged):
Are we going to generalise it to allow any (compile-time constant) terminator?
Why does the terminator have to be a compile-time constant?
I was hesitant about suggesting a generalisation which added run-time overhead over only supporting '\0'.
can you back that up with performance measurements?
(I would expect good compilers to completely remove the overhead; C++0x compiles are likely to guarantee this)
Could you explain? I see that the fact that the default value 0 is being used will be evident at compile time, but how can the library author take advantage of this?
-Thorsten
Jonathan

"Jonathan Turkanis" <technews@kangaroologic.com> wrote in message news:d6jhg6$otk$1@sea.gmane.org... | Thorsten Ottosen wrote: | > can you back that up with performance measurements? | > | > (I would expect good compilers to completely remove the overhead; | > C++0x compiles are likely to guarantee this) | | Could you explain? I see that the fact that the default value 0 is being used | will be evident at compile time, but how can the library author take advantage | of this? if you mean doing traits based on the compile-time value, then he can't, currently. -Thorsten
participants (3)
-
brangdon@cix.compulink.co.uk
-
Jonathan Turkanis
-
Thorsten Ottosen