fix SatFuncMultiplexer on old compilers
"old" == "gcc 4.4". the standard c++ library of this compiler seems to invoke the copy operator when creating objects in a vector, whereas newer versions of the library don't. The problem is that std::unique pointer cannot be copied because it is -- err -- unique and thus the implicit copy operator for the SatFuncMultiplexer class gets deleted by the compiler. the fix is to introduce a "fake" copy operator which does not do anything but is present to make std::vector of stdlibc++-4.4 happy. this is obviously not very elegant, but I could not come up with a better solution. (another fix would be to use raw pointers instead of std::unique_ptr, but IMO this does not qualify as "better".)
This commit is contained in:
parent
038fb6913d
commit
4fe4bee158
@ -82,11 +82,18 @@ public:
|
|||||||
SatFuncMultiplexer()
|
SatFuncMultiplexer()
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
~SatFuncMultiplexer()
|
||||||
|
{}
|
||||||
|
|
||||||
|
// this constructor not really a copy constructor, but it is
|
||||||
|
// required to make std::unique_ptr happy
|
||||||
SatFuncMultiplexer(const SatFuncMultiplexer&)
|
SatFuncMultiplexer(const SatFuncMultiplexer&)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
~SatFuncMultiplexer()
|
// this operator does not do anything and is thus not a copy operator, but it is
|
||||||
{}
|
// required to make std::unique_ptr happy on old compilers
|
||||||
|
SatFuncMultiplexer& operator=(const SatFuncMultiplexer& other)
|
||||||
|
{ return *this; }
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Pick the correct saturation function type and initialize the object using
|
* \brief Pick the correct saturation function type and initialize the object using
|
||||||
|
Loading…
Reference in New Issue
Block a user