Re: C++ property support (was: C++ attribute support)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Saturday 09 April 2005 9:32 pm, Stefan Strasser wrote:
> Christian Parpart schrieb:
> > Hi,
> >
> > as I just read about, that C++ will support attributes within
> > next standard, I'd be curious about how G++ will think about.
> > And, wether it already has any extensions to support them.
>
> what do you mean by "attributes"? I can't find a proposal describing
> something by that name. in case you're referring to your earlier emails:
> there is a proposal for modules in C++ which you can find here:
>
> http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1778.pdf

oopsie! that's been a mixup. too many conversations at the same time. sorry.

The borland proposal:

class my_foo {
public:
    property<int> foo { read getFoo, write setFoo };

private:
    int getFoo() { return value; }
    void setFoo(int v) { value = v}

    int value;
};

http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2002/n1384.pdf

and the microsoft proposal (derived from C#)

class my_bar {
public: 
    property int bar {
        int get() { return value; }
        void set(int v) { value = v; }
    }
private:
    int value;
}

http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2004/n1600.html

Regards,
Christian Parpart.

-- 
Netiquette: http://www.ietf.org/rfc/rfc1855.txt
 20:45:21 up 17 days,  9:51,  1 user,  load average: 0.38, 0.51, 0.58

Attachment: pgp8bvZjYX2dk.pgp
Description: PGP signature


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux