http://llvm.org/bugs/show_bug.cgi?id=10108

           Summary: Property of reference type not supported for
                    Objective-C++
           Product: clang
           Version: 2.9
          Platform: Macintosh
        OS/Version: MacOS X
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected], [email protected]


GCC supports reference types for properties in Objective-C++ mode. This is not
supported by clang even when using -std=gnu++0x.

Example:

% cat main.mm
#import <Foundation/Foundation.h>

@interface Test : NSObject { int i; }
@property (readonly) int const& i;
@end

@implementation Test
@synthesize i;
@end

int main (int argc, char const* argv[]) { return 0; }

----------8<----------

% clang++ -std=gnu++0x -lobjc -framework Foundation main.mm
main.mm:4:1: error: property of reference type is not supported
@property (readonly) int const& i;
^
main.mm:8:13: error: property implementation must have its declaration in
interface 'Test'
@synthesize i;
            ^
2 errors generated.

----------8<----------

Using references is required when wrapping non-POD types in an Objective-C
class.

-- 
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

Reply via email to