<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 - Partial specialization is not matched inside of template class"
href="https://bugs.llvm.org/show_bug.cgi?id=38131">38131</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Partial specialization is not matched inside of template class
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>6.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>enhancement
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>C++
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>Vladimir.Gubarev@itiviti.com
</td>
</tr>
<tr>
<th>CC</th>
<td>dgregor@apple.com, llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>Code will compile if you remove template for A.
template <class T>
class A
{
public:
template <class F>
A(const F & f) : m_holder(holder(f)) {}
template <class F, class S>
A(const F & f, const S & s) : m_holder(holder(f, s)) {}
private:
struct IHolder {};
template <class Msg, class Msg1 = int>
struct Holder;
template <class F>
struct Holder<F> : IHolder
{
explicit Holder(const F & f) : m_f(f) { }
F m_f;
};
template <class F, class S>
struct Holder : IHolder
{
explicit Holder(const F & f, const S & s) : m_f(f), m_s(s) { }
F m_f;
S m_s;
};
template <class F>
static IHolder * holder(const F & f)
{
return new Holder<F, int>(f);
}
template <class F, class S>
static IHolder * holder(const F & f, const S & s)
{
return new Holder<F, S>(f, s);
}
IHolder * m_holder;
};
int main()
{
A<double>(10);
A<double>(10, 10.);
return 0;
}</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>