Boost logo

Boost Users :

From: Jeremy Siek (jsiek_at_[hidden])
Date: 2002-04-05 14:13:53


Hi Vijay,

On Fri, 5 Apr 2002, macrodisk wrote:
macrod> Thank you for your reply. The following code gives me the error in
macrod> Borland compiler:
macrod>
macrod> boost::char_separator<char> sep(";", boost::keep_empty_tokens);
macrod>
macrod> [C++ Error] CVLZOut1.cpp(23): E2285 Could not find a match
macrod> for 'boost::char_separator<char,char_traits<char> >::char_separator
macrod> (char *,boost::empty_token_policy)'

That is right, it should give an error. The above is incorrect usage.

macrod> but this works fine:
macrod> boost::char_separator<char> sep(";", "|", boost::keep_empty_tokens);
macrod>
macrod> I had expected the first version to work too, since
macrod> boost::char_separator<char> sep(";");
macrod> works fine and I just want to add keep_empty_tokens to this.

Sorry. The way default arguments work in C++ is not the most ideal. There
is no particularly good way to handle this kind of thing.

Ciao,
Jeremy

----------------------------------------------------------------------
 Jeremy Siek http://php.indiana.edu/~jsiek/
 Ph.D. Student, Indiana Univ. B'ton email: jsiek_at_[hidden]
 C++ Booster (http://www.boost.org) office phone: (812) 855-3608
----------------------------------------------------------------------


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net