[patch] Fix clang error with std::experimental::filesystem::path
Jonathan Wakely
jwakely@redhat.com
Tue Dec 1 11:33:00 GMT 2015
I got a report that Clang fails to compile the filesystem lib, with
the following error:
/home/jwakely/gcc/latest/include/c++/6.0.0/experimental/bits/fs_path.h:563:18: fatal error: explicit specialization of 'std::experimental::filesystem::v1::path::__is_encoded_char<char>' after instantiation
struct path::__is_encoded_char<char> : std::true_type
^~~~~~~~~~~~~~~~~~~~~~~
/home/jwakely/gcc/latest/include/c++/6.0.0/experimental/bits/fs_path.h:104:9: note: implicit instantiation first required here
: decltype(__is_path_src(std::declval<_Source>(), 0))
^
The problem is that the path::_Cmpt constructors do overload
resolution on the path constructors, which requires the explicit
specializations of __is_encoded_char. Solved by moving the definition
of _Cmpt after the specializations.
I'm still reducing it to report a g++ bug for the missed diagnostic.
Tested powerpc64le-linux, committed to trunk. This is unfortunately
too late for 5.3, so I'll fix it on the branch when it reopens.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.txt
Type: text/x-patch
Size: 1470 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20151201/34cbd6cf/attachment.bin>
More information about the Libstdc++
mailing list