<html>
<head>
<base href="https://llvm.org/bugs/" />
</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 --- - Error calling is_convertible with incomplete type (using gcc or _LIBCPP_USE_IS_CONVERTIBLE_FALLBACK)"
href="https://llvm.org/bugs/show_bug.cgi?id=26103">26103</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Error calling is_convertible with incomplete type (using gcc or _LIBCPP_USE_IS_CONVERTIBLE_FALLBACK)
</td>
</tr>
<tr>
<th>Product</th>
<td>libc++
</td>
</tr>
<tr>
<th>Version</th>
<td>3.7
</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>mdaniels@qnx.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org, mclow.lists@gmail.com
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=15598" name="attach_15598" title="Minimal example to reproduce">attachment 15598</a> <a href="attachment.cgi?id=15598&action=edit" title="Minimal example to reproduce">[details]</a></span>
Minimal example to reproduce
This was found trying to build llvm with gcc 5.3 + libc++ 3.7.0.
Using gcc+libstdc++ or clang+libc++ is fine, but I was able to reproduce with
clang+libc++ by adding -D_LIBCPP_USE_IS_CONVERTIBLE_FALLBACK to the command.
I have reduced the problem as much as possible, see attached. I can reproduce
with the official 3.7.1 release for Ubuntu 14.04, but not the 3.6.2 releases. I
have narrowed this down to r233552, reverting that and this specific case
starts working again.
$ ./clang+llvm-3.7.1-x86_64-linux-gnu-ubuntu-14.04/bin/clang++ -std=gnu++11
-stdlib=libc++ -D_LIBCPP_USE_IS_CONVERTIBLE_FALLBACK -o /tmp/test -c
/tmp/test.cpp
/tmp/test.cpp:4:18: error: incomplete type 'MyClass' named in nested name
specifier
const typename Info::offset_type off;
^~~~~~
/home/mdaniels/clang+llvm-3.7.1-x86_64-linux-gnu-ubuntu-14.04/bin/../include/c++/v1/type_traits:876:14:
note: in instantiation of template class 'InfoWrapper<MyClass>' requested here
decltype(__test_convert<_To>(_VSTD::declval<_From>()))> : public true_type
^
/home/mdaniels/clang+llvm-3.7.1-x86_64-linux-gnu-ubuntu-14.04/bin/../include/c++/v1/type_traits:913:31:
note: during template argument deduction for class template partial
specialization
'__is_convertible_test<type-parameter-0-0, type-parameter-0-1,
decltype(__test_convert<_To>(std::__1::declval<_From>()))>' [with _From =
InfoWrapper<MyClass> *, _To = InfoWrapper<MyClass> *]
__is_convertible_imp::__is_convertible_test<_T1, _T2>::value
^
/home/mdaniels/clang+llvm-3.7.1-x86_64-linux-gnu-ubuntu-14.04/bin/../include/c++/v1/type_traits:976:14:
note: in instantiation of template class
'std::__1::__is_convertible<InfoWrapper<MyClass> *, InfoWrapper<MyClass> *, 0,
0>'
requested here
: public __is_convertible<_T1, _T2>
^
/tmp/test.cpp:12:36: note: in instantiation of template class
'std::__1::is_convertible<InfoWrapper<MyClass> *, InfoWrapper<MyClass> *>'
requested here
static const bool is_conv = std::is_convertible<MyInfo*, MyInfo*>::value;
^
/tmp/test.cpp:7:7: note: forward declaration of 'MyClass'
class MyClass;
^
1 error generated.</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>