[llvm-bugs] [Bug 48743] New: Compile failure in overload resolution between filesystem::path and void*
via llvm-bugs
llvm-bugs at lists.llvm.org
Wed Jan 13 11:06:17 PST 2021
https://bugs.llvm.org/show_bug.cgi?id=48743
Bug ID: 48743
Summary: Compile failure in overload resolution between
filesystem::path and void*
Product: libc++
Version: 11.0
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: All Bugs
Assignee: unassignedclangbugs at nondot.org
Reporter: ed at catmur.co.uk
CC: llvm-bugs at lists.llvm.org, mclow.lists at gmail.com
#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++
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90454
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20210113/100608df/attachment.html>
More information about the llvm-bugs
mailing list