unresolved symbols from value.cpp/.h
Woebbeking at onlinehome.de
Wed Feb 1 19:12:20 GMT 2006
On Tuesday 24 January 2006 20:18, Christian Ehrlicher wrote:
> Maks Orlovich schrieb:
> > There is no ugly hack there. Just a standard language idiom. These
> > methods should never be used. The only way to ensure that is to
> > declare them and mark them private, as otherwise public defaults
> > will be generated. And as they can't ever do anything sensible,
> > there is no definition. (The only acceptable one would be abort(),
> > basically). The point is, ValueImp's are not copyable, even though
> > they're exported outside the library.
> > And again, the only solution is a #define to disable those for the
> > broken compilers out there.
> Ok, I'll stop calling it ugly and make a define :)
There's another way, the Boost way. Declare a class
private: // emphasize the following members are private
noncopyable( const noncopyable& );
const noncopyable& operator=( const noncopyable& );
(copied from boost/noncopyable.hpp) somewhere without the EXPORT define
and then just derive i.e. ValueImp from noncopyable. So there're no
unresolved symbols in ValueImp.
Attached is the complete boost header.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 1014 bytes
Desc: not available
More information about the kde-core-devel