
13 May
2005
13 May
'05
6:57 p.m.
Martin wrote:
Wouldn't the flex_string be even more flexible if it accepted ranges in constructor, assignment etc. (same for fixed_string, const_string of course)
Then you could easily switch between different string types without the .c_str ()
template <class RangeT> flex_string(const RangeT& input, const A& a = A()) : Storage(a) { assign(begin(input), end(input)); }
That would take it away from std::basic_string, but I think it's an standard-allowed extension. Andrei