<html>
<head>
<base href="http://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 --- - Support attribute deprecated for template alias"
href="http://llvm.org/bugs/show_bug.cgi?id=17862">17862</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Support attribute deprecated for template alias
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</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++11
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>foss@grueninger.de
</td>
</tr>
<tr>
<th>CC</th>
<td>dgregor@apple.com, llvmbugs@cs.uiuc.edu
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>I want to rename a templated class. To make the transition easier for the
users, I'd like to keep the old class for one more version and mark it
deprecated with the extensions from GCC / Clang (attribute deprecated). To
avoid keeping an exact copy of the deprecated class, the use of template alias
would be handy. Unfortunately Clang (3.3 and recent trunk) does not emit a
warning (GCC does) for the following code in line 14:
template <class T>
struct NewClassName
{
// ...
};
template <class T> using OldClassNameUsing __attribute__ ((deprecated))
= NewClassName<T>;
typedef NewClassName<int> OldClassNameTypedef __attribute__ ((deprecated));
int main()
{
OldClassNameUsing<int> objectUsing;
OldClassNameTypedef objectTypedef;
return 0;
}
Clang used:
clang version 3.4 (194323)
Target: x86_64-unknown-linux-gnu
Thread model: posix</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>