
Gennaro Prota wrote:
On Wed, 02 Aug 2006 04:56:27 -0400, Beman Dawes <bdawes@acm.org> wrote:
I really don't think we want to force users to write:
assert( contains_dot( path(foo) ) );
Why not? Regardless of the example, I think we shouldn't blur the distinction between paths and strings, though the latter are perhaps the most common *representation* of the former.
That would imply the conversion from const char * should be explicit too. Users would have to write: assert( contains_dot( path("foo.bar") ) ); instead of: assert( contains_dot( "foo.bar" ) ); For simple, script-like programs that do a lot of file operations, that is asking a lot of the user. As far as I can remember, there has never been a complaint from any user regarding the converting constructors. Is there any reason other than a concern for design purity that leads you to want explicit constructors? --Beman