[patch] Implement ISO/IEC TS 18822 C++ File system TS

Luke Allardyce lukeallardyce@gmail.com
Fri May 1 22:39:00 GMT 2015

On mingw-w64 there are now more issues to do with using the narrow
versions of some functions, I was able to get dir.cc to compile with
the attached patch to give you an idea.

ops.cc fails as well, again a lot of it seems to be wide char issues,
I've attached the messages.


On 2 May 2015 at 05:05, Jonathan Wakely <jwakely@redhat.com> wrote:
> On 01/05/15 20:38 +0100, Jonathan Wakely wrote:
>> On 01/05/15 21:28 +0200, Daniel Krügler wrote:
>>> But if I read your implementation of path::compare(const path& p)
>>> correctly it *also* may allocate memory by copying _M_pathname into a
>>> _Cmpt object.
>> Yes, I agree that there's a bug here that could cause it to
>> std::terminate.
>>> I was wondering whether for this comparison there exists
>>> real need to *copy* _M_pathname (potentially exceeding the memory
>>> limits). Wouldn't it be possible to define a _CmptRef type that for
>>> the purpose of implementing compare(const path& p) just refers to
>>> references of the _M_pathname and therefore doesn't need to allocate
>>> any dynamic storage? (I should have spoken of a new type _CmptRef and
>>> not of your existing _Cmpt).
>> Ah, I see what you mean (I thought you were suggesting some
>> improvements to _Cmpt itself ... which might be possible so I'm glad
>> you made me think about it :-)
>> I think I wrote compare() like that because it was easier, and when I
>> first implemented this we had COW strings so it wouldn't throw when
>> copying. That isn't true now, so I need to change it.
> And here's the fix for this noexcept issue, it was very simple in the
> end, thanks for the idea.
> Tested powerpc64le-linux, committed to trunk.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dir.cc.patch
Type: text/x-patch
Size: 2638 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20150501/cc42515f/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ops.cc.error
Type: application/octet-stream
Size: 12098 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20150501/cc42515f/attachment.obj>

More information about the Libstdc++ mailing list