[LLVMbugs] [Bug 16818] New: friend from different namespace doesn't work when return type is provided indirectly
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Wed Aug 7 01:50:14 PDT 2013
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: unassignedclangbugs at nondot.org
Reporter: wygos at mimuw.edu.pl
CC: llvmbugs at cs.uiuc.edu
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20130807/bd4de502/attachment.html>
More information about the llvm-bugs
mailing list