You wrote: <snip>
In the case of dangling links I obtain a not_found_error. This seems to be a contradiction. First I find something (and obtain an iterator) and without any interference from outside is_directory() tells me it cannot find the object. The problem is that directory_iterator refers to the link whereas is_directory() and the following exception refer to the target (which is missing). <snip>
To make this consistent, then, maybe is_directory() and friends should be using lstat rather than stat on Unix. Is it desirable that links be resolved? I suppose it is if the iterator is being used to walk a whole tree - but not if it's being used to list a single directory. Perhaps there is a need to include explicit support for links in the API. Windows has supported them since 2000, so they aren't just a Unix thing now.