[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-core-devel
Subject: Re: Pimpl copying
From: "Michel Hermier" <michel.hermier () gmail ! com>
Date: 2006-07-15 7:07:21
Message-ID: 2e631f490607150007l2a44aaf5hd2d3b364d56632b () mail ! gmail ! com
[Download RAW message or body]
> --- kdemacros.h.cmake (revision 562532)
> +++ kdemacros.h.cmake (working copy)
> @@ -413,8 +413,8 @@
>
> #define KDE_PIMPL_BASE_MACRO(COPY_ACCESS,X) \
> COPY_ACCESS: \
> - X(const X##&); \
> - X##& operator=(const X##&); \
> + X(const X &); \
> + X & operator=(const X &); \
> private: \
> class X##Private; \
> X##Private * const d;
>
> Is this a gcc bug or is X##& an invalid preprocessor command?
>
For me X##& is an invalid preprocessor command. The aim off the ##
preprocessor directive is to build a new name from a template
argument. But & was never legal as a part of a variable name. So the
preprocessor say that the result "Foo&" don't qualify a valid variable
name (token).
"X &" works but I think "X&", as this, should also works since the
preprocessor should see it as 2 tokens.
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic