31 namespace typehandling {
40 : _value(other._value ? other._value->
clone() :
std::unique_ptr<
Storable>()) {}
45 _value = other._value->clone();
59 PolymorphicValue::operator
Storable&() {
return get(); }
60 PolymorphicValue::operator
Storable const&()
const {
return get(); }
75 return get().equals(
other.get());
78 return _value ==
other._value;
PolymorphicValue & operator=(PolymorphicValue const &other)
Container that passes Storable objects by value while preserving type.
PolymorphicValue(Storable const &value)
Create a new object containing a copy of a Storable.
Interface supporting iteration over heterogenous containers.
ItemVariant const * other
A base class for image defects.
~PolymorphicValue() noexcept
void swap(Image< PixelT > &a, Image< PixelT > &b)
std::size_t hash_value() const
Return a hash of this object (optional operation).
#define LSST_EXCEPT(type,...)
bool empty() const noexcept
Check whether this object contains a Storable.
Storable & get()
Return a reference to the internal Storable, if one exists.
bool operator==(PolymorphicValue const &other) const noexcept
Test whether the contained Storables are equal.