
20 Oct
2011
20 Oct
'11
7:42 p.m.
On 10/20/2011 06:45 PM, Robert Ramey wrote:
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.
Maybe you missed this: #define NEW_OPAQUE_TYPE(new_name, current_type) \ struct new_name : current_type \ { \ using current_type::current_type; \ }; The 'using' here is is a new C++11 feature that is useful for defining strong typedefs.