what is an opaque_type?

Discussion in 'C++' started by =?gb2312?B?wNbA1rTzzOzKpg==?=, Jan 23, 2007.

  1. I see a declaraion in a open source software: "opaque_type( Doc );".
    Then what is an opaque_type? Is it a macro?
    =?gb2312?B?wNbA1rTzzOzKpg==?=, Jan 23, 2007
    #1
    1. Advertising

  2. =?gb2312?B?wNbA1rTzzOzKpg==?=

    Kai-Uwe Bux Guest

    ????? wrote:

    > I see a declaraion in a open source software: "opaque_type( Doc );".
    > Then what is an opaque_type? Is it a macro?


    Who knows: the identifier "opaque_type" is not defined by the C++ language.
    Without seeing the code you have before you, nobody can tell.


    Best

    Kai-Uwe Bux
    Kai-Uwe Bux, Jan 23, 2007
    #2
    1. Advertising

  3. =?gb2312?B?wNbA1rTzzOzKpg==?=

    Greg Guest

    Greg, Jan 23, 2007
    #3
  4. =?gb2312?B?wNbA1rTzzOzKpg==?=

    Greg Guest

    ä¹ä¹å¤§å¤©å¸ˆ wrote:
    > I see a declaraion in a open source software: "opaque_type( Doc );".
    > Then what is an opaque_type? Is it a macro?


    In C and C++ an opaque type is a pointer to an incomplete type that is
    never defined.

    For information on the uses and benefits of opaque types see:
    http://tinyurl.com/2n3mcz

    Greg
    Greg, Jan 23, 2007
    #4
  5. On 22 Jan 2007 23:51:23 -0800, "Greg" wrote:
    >=E4=B9=90=E4=B9=90=E5=A4=A7=E5=A4=A9=E5=B8=88 wrote:
    >> I see a declaraion in a open source software: "opaque_type( Doc );".
    >> Then what is an opaque_type? Is it a macro?

    >
    >In C and C++ an opaque type is a pointer to an incomplete type


    I'd agree with that definition. Sometimes also void* is described as
    opaque type which is IMO misleading and should be avoided.

    >that is never defined.


    .... that is not defined in a header file accessible to the user. It
    needs to be defined somewhere.

    Best regards,
    Roland Pibinger
    Roland Pibinger, Jan 23, 2007
    #5
    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.

Share This Page