[LLVMbugs] [Bug 9668] New: parse error when using a typedef for a static member variable of a template
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Sun Apr 10 03:49:41 PDT 2011
http://llvm.org/bugs/show_bug.cgi?id=9668
Summary: parse error when using a typedef for a static member
variable of a template
Product: clang
Version: trunk
Platform: Other
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P
Component: Frontend
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: juergen.hunold at ivembh.de
CC: llvmbugs at cs.uiuc.edu
Consider the following code:
namespace First
{
template<class T>
class Bar
{
protected:
static const bool static_bool;
};
}
namespace Second
{
class Foo;
}
typedef First::Bar<Second::Foo> Special;
namespace
First
{
template<>
const bool Special::static_bool(false);
}
clang -v
clang version 3.0 (trunk 129243)
Target: x86_64-unknown-linux-gnu
Thread model: posix
a.cpp:22:5: error: extraneous 'template<>' in declaration of variable
'static_bool'
template<>
^~~~~~~~~~
1 error generated.
This examples compiles with gcc-4.3 up to 4.6 and at least msvc-9.0
Clang compiled it fine, but this broke a week (or so) before the branch for 2.9
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list