#define and commas
From: Bolin (gao_bolin_at_voila.fr)
Date: 10/29/04
- Next message: Default User: "Re: templated function with vector"
- Previous message: John Harrison: "Re: templated function with vector"
- Next in thread: Victor Bazarov: "Re: #define and commas"
- Reply: Victor Bazarov: "Re: #define and commas"
- Reply: chris: "Re: #define and commas"
- Reply: John Harrison: "Re: #define and commas"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 29 Oct 2004 13:49:24 -0700
I am using a macro to define template functions that look the same
except for a type. However when the return type it a template class
with several template arguments (say, A<T1, T2>) then the macro does
not work because of the comma -- the macro thinks there are more
arguments provided since the comma separates arguments. To avoid the
comma being taken into account the usual way is to put parenthesis,
but here it would not work because the argument is a return type, and
I cannot declare a function like
(A<T1, T2>) foo();
Is there a way to get around this problem?
Thanks
B.
- Next message: Default User: "Re: templated function with vector"
- Previous message: John Harrison: "Re: templated function with vector"
- Next in thread: Victor Bazarov: "Re: #define and commas"
- Reply: Victor Bazarov: "Re: #define and commas"
- Reply: chris: "Re: #define and commas"
- Reply: John Harrison: "Re: #define and commas"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|