<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 - Assertion on instantiating function definition from template type function"
href="https://bugs.llvm.org/show_bug.cgi?id=40024">40024</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Assertion on instantiating function definition from template type function
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Hardware</th>
<td>All
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</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>C++'17
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>christian.bruel@st.com
</td>
</tr>
<tr>
<th>CC</th>
<td>blitzrakete@gmail.com, erik.pilkington@gmail.com, llvm-bugs@lists.llvm.org, richard-llvm@metafoo.co.uk
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=21224" name="attach_21224" title="reproduce -stdc++17">attachment 21224</a> <a href="attachment.cgi?id=21224&action=edit" title="reproduce -stdc++17">[details]</a></span>
reproduce -stdc++17
The attached code compiled with
clang++ -std=c++17 bug.C
asserts with
lib/Sema/SemaTemplate.cpp:6814: clang::ExprResult
clang::Sema::BuildExpressionFromDeclTemplateArgument(const
clang::TemplateArgument&, clang::QualType, clang::SourceLocation): Assertion
`!RefExpr.isInvalid() && Context.hasSameType(((Expr*)
RefExpr.get())->getType(), ParamType.getUnqualifiedType())' failed.
I'm not sure it is valid c++17. it compiles fine with c++11 and returns the
following error with g++:
error: 'int (S::*)(){((int (S::*)())S::f<110>), 0}' is not a valid template
argument for type 'int (S::*)()'</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>