digitalmars.D.learn - How I can determine this is class or struct at compile time?
- Weed <resume755 mail.ru> Dec 26 2008
- BCS <ao pathlink.com> Dec 26 2008
- "Bill Baxter" <wbaxter gmail.com> Dec 27 2008
- BCS <ao pathlink.com> Dec 27 2008
Reply to Weed,subj
is(typeof(*this))?"struct":"class"; // untested
Dec 26 2008
On Sat, Dec 27, 2008 at 4:14 PM, BCS <ao pathlink.com> wrote:Reply to Weed,subj
is(typeof(*this))?"struct":"class"; // untested
if (is(typeof(this) == class)) { // is class } else { //not } This page is your friend: http://www.digitalmars.com/d/1.0/expression.html#IsExpression Keep a copy under your pillow. --bb
Dec 27 2008
Reply to Bill,On Sat, Dec 27, 2008 at 4:14 PM, BCS <ao pathlink.com> wrote:Reply to Weed,subj
// is class } else { //not } This page is your friend: http://www.digitalmars.com/d/1.0/expression.html#IsExpression Keep a copy under your pillow. --bb
Um... Doh... that what I get for working to late at night.
Dec 27 2008









BCS <ao pathlink.com> 