Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > Create and declare new type...

Reply
Thread Tools

Create and declare new type...

 
 
Noah Roberts
Guest
Posts: n/a
 
      03-22-2011
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.

--
http://crazycpp.wordpress.com
 
Reply With Quote
 
 
 
 
Victor Bazarov
Guest
Posts: n/a
 
      03-22-2011
On 3/21/2011 8:09 PM, Noah Roberts wrote:
> 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
--
I do not respond to top-posted replies, please don't ask
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
FAQ 7.8 How do I declare/create a structure? PerlFAQ Server Perl Misc 0 02-22-2011 11:00 PM
FAQ 7.8 How do I declare/create a structure? PerlFAQ Server Perl Misc 0 02-12-2011 05:00 PM
How to declare a port with a new type Weng Tianxiang VHDL 8 07-16-2010 09:32 AM
how to declare an array of objects without "new" b83503104@yahoo.com C++ 16 07-11-2005 04:14 PM
When to use 'As New' to declare an object Ritu ASP .Net 2 08-13-2003 05:47 PM



Advertisments