1 #ifndef DASH__UTIL__UNIVERSAL_MEMBER_H__INCLUDED 2 #define DASH__UTIL__UNIVERSAL_MEMBER_H__INCLUDED 49 template <
class ValueType>
64 std::shared_ptr<ValueType> _value;
75 : _value(std::make_shared<ValueType>(std::move(value)))
77 constexpr
explicit UniversalMember(
const ValueType & value)
78 : _value(&const_cast<ValueType &>(value),
81 constexpr
explicit UniversalMember(
const ValueType * value)
82 : _value(const_cast<ValueType *>(value),
86 operator ValueType & () {
return *(_value.get()); }
87 constexpr
operator const ValueType & ()
const {
return *(_value.get()); }
90 *(_value.get()) = std::forward<ValueType>(value);
94 constexpr
const std::shared_ptr<ValueType> & shared()
const {
101 #endif // DASH__UTIL__UNIVERSAL_MEMBER_H__INCLUDED This class is a simple memory pool which holds allocates elements of size ValueType.
struct dash::dart_operation ValueType
Reduce operands to their minimum value.
Utility class template to capture values from both moved temporaries (rvalues) and named references t...