http://llvm.org/bugs/show_bug.cgi?id=16818
Bug ID: 16818
Summary: friend from different namespace doesn't work when
return type is provided indirectly
Product: clang
Version: 3.3
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: -New Bugs
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Classification: Unclassified
The code below doesn't compile. It compiles if you replace returning type
"type" with void. The code compiles on gcc 4.7.3. the code compiles if you
remove the "d" namesapce.
#include <iostream>
namespace n {
namespace d {
struct A;
}
class ReplacedType {
public:
typedef void type;
};
//forward declaration
ReplacedType::type
f(d::A);
namespace d {
struct A {
typedef ::n::ReplacedType::type type;
friend
type
// void
::n::f(A);
private:
int a;
};
}
ReplacedType::type
f(d::A a) {
std::cout << a.a <<std::endl;
}
}
int main() {
return 0;
}
--
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