|
Boost : |
From: Beman Dawes (bdawes_at_[hidden])
Date: 2003-08-21 13:38:37
At 08:31 PM 8/19/2003, David Abrahams wrote:
>
>It surprised me a bit that leaf returns a string instead of a path.
The rule isn't entirely obvious. If a decomposition function can possibly
return more that one element, it is returned as type path. If at most a
single element is returned, the return type is std::string.
>Shouldn't
>
> "foo/bar"/p.leaf()
>
>work?
Yes, via the automatic conversion. I just added a test case to path_test to
verify that. Yes, it does work. I expect there would have been scads of bug
reports if it didn't work.
--Beman
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk