This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [v3] ext/type_traits.h


On Fri, 29 Sep 2006 22:12:41 +0200, Gennaro Prota
<gennaro_prota@yahoo.com> wrote:

>[...]
>
>An example of usage is:
>
>#define PREFIX_specialize_unsigned_of_cv( t, u )                     \
>    template<>                                                       \
>    struct unsigned_of< t >                                          \
>    { typedef cv_qualifier< t >::pass_through< u >::type type; }  /**/
>
>#define PREFIX_specialize_unsigned_of( t, u )                        \
>    PREFIX_specialize_unsigned_of_cv(t, u );                         \
>    PREFIX_specialize_unsigned_of_cv(const t, const u );             \
>    PREFIX_specialize_unsigned_of_cv(volatile t, volatile u );       \
>    PREFIX_specialize_unsigned_of_cv(const volatile t,               \
>                                     const volatile u )           /**/

Well, of course

#define PREFIX_specialize_unsigned_of( t, u )                  \
    PREFIX_specialize_unsigned_of_cv(t, u );                   \
    PREFIX_specialize_unsigned_of_cv(const t, u );             \
    PREFIX_specialize_unsigned_of_cv(volatile t, u );          \
    PREFIX_specialize_unsigned_of_cv(const volatile t, u )  /**/

is better. Sorry for the copy-and-paste mess.

--
Genny.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]