<html>
<head>
<base href="https://bugs.llvm.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - Compile failure in overload resolution between filesystem::path and void*"
href="https://bugs.llvm.org/show_bug.cgi?id=48743">48743</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Compile failure in overload resolution between filesystem::path and void*
</td>
</tr>
<tr>
<th>Product</th>
<td>libc++
</td>
</tr>
<tr>
<th>Version</th>
<td>11.0
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>All Bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>ed@catmur.co.uk
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org, mclow.lists@gmail.com
</td>
</tr></table>
<p>
<div>
<pre>#include <filesystem>
void f(std::filesystem::path const&);
void f(void*);
void g(void* p) { f(p); }
In file included from <source>:1:
In file included from include/c++/v1/filesystem:236:
include/c++/v1/iterator:565:16: error: cannot form a reference to 'void'
typedef _Tp& reference;
^
include/c++/v1/iterator:518:54: note: in instantiation of template class
'std::__1::iterator_traits<void *>' requested here
template <class _Up> static char __test(typename _Up::iterator_category* =
0);
^
include/c++/v1/iterator:520:38: note: while substituting explicitly-specified
template arguments into function template '__test'
static const bool value = sizeof(__test<_Tp>(0)) == 1;
^
include/c++/v1/iterator:572:40: note: in instantiation of template class
'std::__1::__has_iterator_category<std::__1::iterator_traits<void *>>'
requested here
template <class _Tp, class _Up, bool =
__has_iterator_category<iterator_traits<_Tp> >::value>
^
include/c++/v1/iterator:581:43: note: in instantiation of default argument for
'__has_iterator_category_convertible_to<void *, std::__1::input_iterator_tag>'
required here
struct __is_cpp17_input_iterator : public
__has_iterator_category_convertible_to<_Tp, input_iterator_tag> {};
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/c++/v1/filesystem:628:37: note: in instantiation of template class
'std::__1::__is_cpp17_input_iterator<void *>' requested here
template <class _Iter, bool _IsIt = __is_cpp17_input_iterator<_Iter>::value,
^
include/c++/v1/filesystem:649:44: note: in instantiation of default argument
for '__is_pathable_iter<void *>' required here
bool _IsIterT = !_IsCharIterT && __is_pathable_iter<_Tp>::value>
^~~~~~~~~~~~~~~~~~~~~~~
include/c++/v1/filesystem:741:26: note: in instantiation of default argument
for '__is_pathable<void *, false, false>' required here
typename enable_if<__is_pathable<_SourceOrIter>::value, _Tp>::type;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/c++/v1/filesystem:771:36: note: in instantiation of template type alias
'_EnableIfPathable' requested here
template <class _Source, class = _EnableIfPathable<_Source, void> >
^
include/c++/v1/filesystem:772:3: note: in instantiation of default argument for
'path<void *>' required here
path(const _Source& __src, format = format::auto_format) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<source>:4:21: note: while substituting deduced template arguments into
function template 'path' [with _Source = void *, $1 = (no value)]
void g(void* p) { f(p); }
^
1 error generated.
This looks pretty much identical to libstdc++
<a href="https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90454">https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90454</a></pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>