John,
Your example won't be compiled at all. Clang and MSVC emit error 
messages in this case.
The next code

  struct A {
     __declspec(property(get=GetX,put=SetX)) int x;
     int GetX() const { return 0; }
     void SetX(long y) {}
   };

a.x = 5;
compiled fine by MSVC and clang and provides correct result on clang 
(i.e. the result value can't be captured at all, because SetX() returns 
void)
return a.x = 5;
clang: error: cannot initialize return object of type 'int' with an 
rvalue of type 'void'
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to