
9 Sep
2010
9 Sep
'10
5:49 p.m.
On 09/09/10 17:48, Yakov Galka wrote
Sorry, but I can't understand you.
I'm talking about template<typename Range> void set_caption(const Range& range); then, depending on typename range_value<const Range>::type, you deduce whether it's UTF-8, UTF-16, or UTF-32.
Not quite right. Strings are ranges from algorithmic point of view. They are containers for all other uses. I prefer to write: string caption = window.get_caption(); rather than: string caption; window.get_caption(back_inserter(caption));
window.get_caption() doesn't need to specify what its return type is, other than it being a range.