Boost logo

Boost :

From: Gary Powell (Gary.Powell_at_[hidden])
Date: 2001-06-01 10:31:12


Hi John,

 Quick question,

For the templated function make_token_iterator, would it be reasonable to
deduce the template argument "Type" from
iterator_traits<Iterator>::value_type ?

so rather than having to specify it as in your example code as

const string test_string = "...";
Iter i = make_token_iterator<string>(test_string.begin(), test_string.end()
... );

instead it would just be

Iter i = make_token_iterator(test_string.begin(), test_string.end()....);

Again this is a question, because without having used this code in actual
practice, I can't say whether or not the traits request would get the type
right enough times to either drop it as a parameter, or to move it to the
end, and use a default argument as the deduction.

I was also wondering if this class could be used with the regex library, to
describe the parsed tokens. (I haven't used that library either, so its more
of a have you tried this question.)

 Yours,
 -gary-

gary.powell_at_[hidden]


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk