Use of typeof() for member data declaration (g++ bug?)

Discussion in 'C++' started by M. Steinbach, Feb 20, 2004.

  1. M. Steinbach

    M. Steinbach Guest

    ---
    class Real {
    public:
    double data;
    };

    class A {
    public:
    Real a;
    typeof( a.data ) b; // Fails
    };

    --- g++ t.C:
    t.C:10: invalid use of member `A::a'
    t.C:10: ISO C++ forbids declaration of `b' with no type
    Posted via Surge1


    ----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
    http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
    ---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---
    M. Steinbach, Feb 20, 2004
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Leon

    Using TypeOf?

    Leon, Nov 1, 2004, in forum: ASP .Net
    Replies:
    7
    Views:
    2,144
    Henri
    Nov 1, 2004
  2. M. Steinbach
    Replies:
    1
    Views:
    623
    tom_usenet
    Feb 20, 2004
  3. fabioppp

    typeof and g++

    fabioppp, Feb 23, 2005, in forum: C++
    Replies:
    10
    Views:
    1,290
    Ben Hetland
    Feb 24, 2005
  4. Jason
    Replies:
    2
    Views:
    493
    Jonathan Mcdougall
    May 13, 2006
  5. Skybuck Flying
    Replies:
    2
    Views:
    330
    Alf P. Steinbach /Usenet
    Jun 21, 2011
Loading...

Share This Page