Create and declare new type...

N

Noah Roberts

I'm looking for something such that I can:

MACRO(xxx) * funny;

This will declare a pointer to a struct with a virtual function called
'xxx' with void() signature.

Furthermore I want to be able to:

some_template<MACRO(xxx)>

thus I don't believe that macro can simply be "struct { virtual void
xxx() = 0; }"

Been playing around with decltype. Seems to me that something should be
possible here but I can't find it so far.
 
V

Victor Bazarov

I'm looking for something such that I can:

MACRO(xxx) * funny;

This will declare a pointer to a struct with a virtual function called
'xxx' with void() signature.

Furthermore I want to be able to:

some_template<MACRO(xxx)>

thus I don't believe that macro can simply be "struct { virtual void
xxx() = 0; }"

Been playing around with decltype. Seems to me that something should be
possible here but I can't find it so far.

Might be simpler to have two macros for that...

V
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,763
Messages
2,569,563
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top