lue_framework_core#

template<typename Element>
class Scalar#

Class for scalar values, representing an omnipresent value.

The actual value is “pointed to” by a shared future. This implies that it can be the result of an asynchronous computation. Continuations can be attached to the value, which will be triggered after the future has become ready.

Copieѕ of shared futures, share their state (the actual value). This implies that copies of Scalar instances, through their copied layered shared future also share the actual value.

Public Functions

inline Scalar()#

Default-construct an instance.

The layered future will be ready immediately, containing a default constructed value.

inline Scalar(Scalar const &other)#

Copy-construct an instance.

The layered future will be copied from the instance passed in. Not that these copies share state (the actual value).

inline Scalar(Scalar &&other) noexcept#

Move-construct an instance.

inline Scalar(Element const &value)#

Convert-construct an instance.

The layered future will be ready immediately, containing a copy of the value passed in.

inline explicit Scalar(Element &&value)#

Convert-construct an instance.

The layered future will be ready immediately, containing the value passed in.

inline Scalar(hpx::future<Element> &&element_f)#

Convert-construct an instance.

The layered future will use the state of the future passed in.

inline Scalar(hpx::shared_future<Element> const &element_f)#

Convert-construct an instance.

The layered future will use the state of the future passed in.

inline Scalar(hpx::shared_future<Element> &&element_f)#

Convert-construct an instance.

The layered future will use the state of the future passed in.

inline auto operator=(Scalar const &other) -> Scalar&#

Copy-assign an instance to this instance.

The state of the layered future of the instance passed in will be shared by the layered future in this instance.

inline auto operator=(Scalar &&other) noexcept -> Scalar&#

Move-assign an instance to this instance.

The state of the layered future of the instance passed in will be moved to the layered future in this instance.

inline auto future() const -> hpx::shared_future<Element> const&#

Return the layered future.

The result can be used to attach continuations to.