Details
Description
In XMemory.hpp two constructors (copy and assignment) have been marked as private/unimplemented:
// -----------------------------------------------------------------------
// Unimplemented constructors and operators
// -----------------------------------------------------------------------
XMemory(const XMemory&);
XMemory& operator=(const XMemory&);
No definition can be found in the corresponding CPP file. Most compilers will (and should) probably not care, since these constructors will never be used. Nevertheless, the lack of a definition causes VC++ 7.0 to emit a linker error when its Whole Program Optimization feature, WPO, is enabled (and I want to use WPO to achieve optimal performance).
The error can be resolved by providing a dummy inline definition in the header file (or perhaps in the implementation file), like this:
XMemory(const XMemory&)
{ /* Not implemented */ }XMemory& operator=(const XMemory&)
{ /* Not implemented */ return *this; }You might want to add an "assert(false);" in both methods in order to make sure any accidental use will not go undetected.
Cheers!