http://llvm.org/bugs/show_bug.cgi?id=8692
Summary: use of default argument to function that is declared
later in class
Product: clang
Version: 2.8
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P
Component: C++
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected], [email protected]
The following program is valid c++ and generates an error with clang++ but
works fine in g++:
$ cat main.cc
class A
{
public:
class B
{
public:
B(int i=1)
{}
};
A(B b = B())
{}
};
int main()
{
A a;
}
$ clang++ main.cc
main.cc:11:13: error: use of default argument to function 'B' that is declared
later in class 'B'
A(B b = B())
^
main.cc:7:10: note: default argument declared here
B(int i=1)
^
1 error generated.
$ clang++ -v
clang version 2.8 (branches/release_28)
Target: x86_64-pc-linux-gnu
Thread model: posix
--
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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs