http://llvm.org/bugs/show_bug.cgi?id=17922
Bug ID: 17922
Summary: Can't C-style cast from template Objective-C++ class
to Objective-C pointer although explicit conversion
operator defined
Product: clang
Version: trunk
Hardware: Macintosh
OS: MacOS X
Status: NEW
Severity: normal
Priority: P
Component: -New Bugs
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Classification: Unclassified
template<typename T> struct RetainPtr {
explicit operator T*() const;
};
@interface A
- (void)b;
@end
@interface B : A
- (void)c;
@end
void f(RetainPtr<A> a)
{
[a b];
[(B *)a c];
}
Yields:
error: cannot convert 'RetainPtr<A>' to 'B *' without a conversion operator
[(B *)a c];
^~~~~~
1 error generated.
--
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