[LLVMbugs] [Bug 12724] New: invalid "redefinition of default argument" error at friend declaration in class template
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Wed May 2 05:03:49 PDT 2012
http://llvm.org/bugs/show_bug.cgi?id=12724
Bug #: 12724
Summary: invalid "redefinition of default argument" error at
friend declaration in class template
Product: clang
Version: 3.0
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P
Component: C++
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: tobias.preclik at informatik.uni-erlangen.de
CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
Classification: Unclassified
Consider the following code:
---- >8 ----
void friendly( bool param = true );
template<typename T>
class Foo {
public:
friend void friendly( bool param );
};
Foo<int> foo;
---- >8 ----
Clang++ 3.0 produces the following compilation error:
---- >8 ----
foo.cpp:6:29: error: redefinition of default argument
friend void friendly( bool param );
^
foo.cpp:9:10: note: in instantiation of template class 'Foo<int>' requested
here
Foo<int> foo;
^
foo.cpp:1:21: note: previous definition is here
void friendly( bool param = true );
^ ~~~~
1 error generated.
---- >8 ----
I suspect this to be a bug.
--
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