|
Boost : |
Subject: Re: [boost] [Re:Opaque Typedef] observations on opaque typedef
From: Dave Abrahams (dave_at_[hidden])
Date: 2011-10-20 12:12:56
on Thu Oct 20 2011, "Robert Ramey" <ramey-AT-rrsd.com> wrote:
> Confusion arises when one googles C++ opaque type. This raises
> a number of papers which address the subject but seem to suggest
> that the "template alias" feature will create a new type. But a careful
> reading of the latest documents suggest that this is not the case.
Correct. It's a new name for the same type.
> This is the motivation for my question.
>
> Of course one define a macro
>
> #define NEW_OPAQUE_TYPE(new_name, current_type) \
> struct new_name : public current_type {};
>
> but I haven't really considered all the implications of this in depth.
>
> To summarize, I expected to find a new feature in C++0X but
> found something else - now I'm wondering what I missed.
I don't think you missed anything.
-- Dave Abrahams BoostPro Computing http://www.boostpro.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk