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

In-Reply-To: <20050516205339.GW11789@lenin.felcer.sk> droba@topmail.sk (Pavol Droba) wrote (abridged):
In addition I would suggest to remove direct support for pointer types like char* from the range library and provide it only via as_string() construct to definitely remove any kind of confusion.
Sounds like a good idea. Are we going to generalise it to allow any (compile-time constant) terminator? If so, is as_string() the best name? -- Dave Harris, Nottingham, UK.

Dave Harris wrote:
In-Reply-To: <20050516205339.GW11789@lenin.felcer.sk> droba@topmail.sk (Pavol Droba) wrote (abridged):
In addition I would suggest to remove direct support for pointer types like char* from the range library and provide it only via as_string() construct to definitely remove any kind of confusion.
Sounds like a good idea.
Are we going to generalise it to allow any (compile-time constant) terminator? If so, is as_string() the best name?
Why does the terminator have to be a compile-time constant? Jonathan

On Tue, May 17, 2005 at 07:53:00PM +0100, Dave Harris wrote:
In-Reply-To: <20050516205339.GW11789@lenin.felcer.sk> droba@topmail.sk (Pavol Droba) wrote (abridged):
In addition I would suggest to remove direct support for pointer types like char* from the range library and provide it only via as_string() construct to definitely remove any kind of confusion.
Sounds like a good idea.
Are we going to generalise it to allow any (compile-time constant) terminator? If so, is as_string() the best name?
There is nothing in the way for the generalization. Also there is nothing there the would prevent use from declaring another manipulator. as_string is quite intuitive for what is designed. What about something like 'as_terminated_array<terminator>(xxxx)' Regards, Pavol
participants (3)
-
brangdon@cix.compulink.co.uk
-
Jonathan Turkanis
-
Pavol Droba