Pimpl copying

Brad Hards bradh at frogmouth.net
Sat Jul 15 02:54:48 BST 2006


On Saturday 15 July 2006 00:42, Peter Kümmel wrote:
> +#define KDE_PIMPL_BASE_MACRO(COPY_ACCESS,X) \
> +COPY_ACCESS: \
> +    X(const X##&); \
> +    X##& operator=(const X##&); \
> +private: \
> +    class X##Private; \
> +    X##Private * const d;
> +
> +#define KDE_PIMPL_ENABLE_COPY(X)  KDE_PIMPL_BASE_MACRO(public, X)
> +#define KDE_PIMPL_DISABLE_COPY(X) KDE_PIMPL_BASE_MACRO(private,X)
> +
> +
>  #endif /* _KDE_MACROS_H_ */
Hmm, I'm having problems with this:

Building CXX object kdecore/CMakeFiles/kdecore.dir/ktempdir.o
In file included from /home/bradh/coding/kdelibs/kdecore/ktempdir.cpp:50:
/home/bradh/coding/kdelibs/kdecore/ktempdir.h:164:1: error: pasting "KTempDir" 
and "&" does not give a valid preprocessing token
/home/bradh/coding/kdelibs/kdecore/ktempdir.h:164:1: error: pasting "KTempDir" 
and "&" does not give a valid preprocessing token
/home/bradh/coding/kdelibs/kdecore/ktempdir.h:164:1: error: pasting "KTempDir" 
and "&" does not give a valid preprocessing token

This is with
gcc version 4.1.1 20060525 (Red Hat 4.1.1-1)

Brad
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20060715/9a5dfb99/attachment.sig>


More information about the kde-core-devel mailing list