Experimental C++17 filesystem on MSVC2015: inconsistencies with permissions
<p>I'm trying to use the experimental <a href="http://en.cppreference.com/w/cpp/experimental/fs" rel="nofollow"><code>&lt;filesystem&gt;</code></a> library that should become part of C++17 (See draft technical spec <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4100.pdf" rel="nofollow">N4100</a>) on <a href="https://msdn.microsoft.com/en-us/library/hh874694.aspx" rel="nofollow">MSVC2015</a> (update 1). </p>

<p>I could manage to display full content of a directory recursively:  </p>

<pre><code>    using namespace std::tr2::sys;
    ...
    path dir = canonical(".");
    for (auto&amp; p : recursive_directory_iterator(dir)) {
        if (is_regular_file(p))                
            cout &lt;&lt; file_size(p);               
        perms pe = p.status().permissions();  // get authorisations
        cout &lt;&lt;"\t"&lt;&lt; (pe &amp; perms::owner_read ? "r" : "-") // &lt;== error should be allowed
            &lt;&lt; (pe &amp; perms::owner_write ? "w" : "-");
        cout &lt;&lt;"\t" &lt;&lt; p &lt;&lt; endl;     
    }
</code></pre>

<p>Problems and questions: </p>

<ol>
<li><p>Bitwise <code>&amp;</code> on the <a href="http://en.cppreference.com/w/cpp/experimental/fs/perms" rel="nofollow"><code>perms</code></a> object: The compiler complains with a <a href="https://msdn.microsoft.com/en-us/library/sy5tsf8z.aspx" rel="nofollow">C2440 error</a> about a missing conversion from perms to bool.  But this should be allowed according to specs.  Is this a bug or did I miss something ?  </p></li>
<li><p>I cirumvented the issue by converting <code>pe</code> an unsigned.  There I noted that the value is always <code>0xffff</code>, for every files, including a file where I have intentionally withdrawn writing authorisations. Will a constant dummy value be returned for permissions on windows systematically or did I forget something to get the valid permissions ?      </p></li>
</ol>