Problem with explicit copy ctor

Stromek stromek at realtime.sk
Fri Feb 23 12:04:07 CET 2007


On Fri, Feb 23, 2007 at 11:46:02AM +0100, Ch.Ehrlicher at gmx.de wrote:
> Von: Stromek <stromek at realtime.sk>
> > On Fri, Feb 23, 2007 at 11:22:08AM +0100, Stromek wrote:
> > > Hi,
> > > 
> > > does anybody know how to fix the following error? Few weeks ago,
> > everything was ok. I am using MSVC 7 .NET 2003.
> > > 
> > > Microsoft (R) Development Environment  Version 7.10.3077.
> > > Copyright (C) Microsoft Corp 1984-2001. All rights reserved.
> > > ------ Build started: Project: kdecore, Configuration: Release Win32
> > ------
> > > 
> > > Generating kconfigskeleton.moc
> > > Compiling...
> > > ktoolinvocation_win.cpp
> > > N:\incoming\kde\kdelibs\KDE\kdelibs\kdecore\util\ksharedptr.h(224) :
> > error C2558
> > > : class 'KSharedConfig' : no copy constructor available or copy
> > constructor is d
> > > eclared 'explicit'
> > 
> > MSDN
> > <http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html/C2558.asp> says:
> > 
> > Trying to copy a class whose copy constructor is explicit. Declaring a
> > copy constructor with explicit prevents passing/returning objects of a class
> > to/from functions.
> > 
> > So why someone declared it explicit? Does it compile under gcc?
> > Resolutions under msvc point just to removing the explicit keyword.
> > 
> That's not the problem - there is no explicit ctor for KSharedConfig ...

yeap, copy ctor is only in KConfig and is declared as private.

-- 
Stromek



More information about the Kde-windows mailing list