Defined in Member types Construction Destructor emplace Assignment operator value The payload always present the access is total never throwing transform and_then apply apply_r apply_type apply_type_r The identity carrier holds exactly one value of T always present The unit of the monadic family as a value no error channel no empty state one payload As trivial as T permits in copying moving assignment and destruction a structural type when T is one A copack payload is deliberately rejected dispatch granularity belongs to the engine uniform per payload so identity over a copack is spelled choice a choice payload stays legal an atom here as everywhere using value_type T 1 The type of the value side T v_ 1 The payload using value_type void 1 The type of the value side constexpr just default 1 constexpr explicit just std in_place_type_t<void> 2 constexpr explicit just std in_place_t 3 Default constructor Constructs the alternative named by the tag in place from the arguments Constructs the value in place from the arguments template <typename> just 1 constexpr just default 2 constexpr just just const & default 3 constexpr just just && default 4 template <typename U> constexpr just U &&v 5 constexpr explicit just U &&v 6 constexpr explicit just std in_place_type_t<T> auto && args 7 template <typename Fn> constexpr explicit just detail _just_from_invoke_t Fn &&make 8 Copy constructor Move constructor Constructs the payload from a value Explicit exactly where the conversion to T is v U && Value to initialize the payload from Constructs the payload in place from the arguments args auto && Arguments to construct the payload from constexpr just default 1 Destructor constexpr auto emplace auto && args > T & 1 Destroys the payload and constructs a new one from the arguments with the strong exception guarantee The mutation path for a payload that does not support assignment Construction that can throw goes through a temporary relocated by nothrow move Arguments that refer into the payload held will dangle as with std optional s and std variant s emplace return Reference to the new payload args auto && Arguments to construct the new payload from constexpr auto operator just const & default > just & 1 constexpr auto operator just && default > just & 2 template <typename U> constexpr auto operator U &&v > just & 3 Copy assignment Move assignment Assignment from a value through the payload s own assignment Assign in place is the whole meaning here the payload is always a T so this consults T s operator alone as copack s same alternative arm does Assigning the payload to itself a a value is a no op by address identity return Reference to *this v U && Value to assign from constexpr auto operator just const & const noexcept default > bool 1 Equality every just compares equal to every other constexpr auto value & > T & 1 constexpr auto value const & > T const & 2 constexpr auto value && > T && 3 constexpr auto value const && > T const && 4 Accesses the payload constexpr auto value const > void 1 Observes the payload there is nothing to observe template <typename Fn> constexpr auto transform Fn &&fn & 1 constexpr auto transform Fn &&fn const & 2 constexpr auto transform Fn &&fn && 3 constexpr auto transform Fn &&fn const && 4 Maps the payload through the callable wrapping the result return just of the callable s result just<void> for a void result fn Fn && Callable applied on the payload template <typename Fn> constexpr auto transform Fn &&fn const 1 Maps through the callable invoked with no arguments return just of the callable s result just<void> for a void result fn Fn && Callable to invoke template <typename Fn> constexpr auto and_then Fn &&fn & 1 constexpr auto and_then Fn &&fn const & 2 constexpr auto and_then Fn &&fn && 3 constexpr auto and_then Fn &&fn const && 4 Binds the payload through the callable which must return a just return The callable s own just fn Fn && Callable applied on the payload template <typename Fn> constexpr auto and_then Fn &&fn const 1 Binds through the callable invoked with no arguments it must return a just return The callable s own just fn Fn && Callable to invoke template <typename Fn typename Args> constexpr auto apply Fn &&fn Args && args & > decltype auto 1 constexpr auto apply Fn &&fn Args && args const & > decltype auto 2 constexpr auto apply Fn &&fn Args && args && > decltype auto 3 constexpr auto apply Fn &&fn Args && args const && > decltype auto 4 Eliminates the payload through the callable The payload is handed over exactly as fn apply would hand it a pack or tuple like payload by elements anything else whole and trailing arguments follow the content return The callable s result fn Fn && Callable applied on the payload args Args && Additional arguments appended after the payload s content template <typename Fn typename Args> constexpr auto apply Fn &&fn Args && args const > decltype auto 1 Eliminates through the callable invoked with the trailing arguments alone return The callable s result fn Fn && Callable to invoke args Args && Arguments the callable is invoked with template <typename Ret typename Fn typename Args> constexpr auto apply_r Fn &&fn Args && args & > Ret 1 constexpr auto apply_r Fn &&fn Args && args const & > Ret 2 constexpr auto apply_r Fn &&fn Args && args && > Ret 3 constexpr auto apply_r Fn &&fn Args && args const && > Ret 4 Eliminates the payload through the callable converting the result to Ret return The callable s result converted to Ret fn Fn && Callable applied on the payload args Args && Additional arguments appended after the payload s content return The callable s result converted to Ret fn Fn && Callable applied on the payload args Args && Additional arguments appended after the payload s content template <typename Ret typename Fn typename Args> constexpr auto apply_r Fn &&fn Args && args const > Ret 1 Eliminates through the callable converting the result to Ret return The callable s result converted to Ret fn Fn && Callable to invoke args Args && Arguments the callable is invoked with return The callable s result converted to Ret fn Fn && Callable to invoke args Args && Arguments the callable is invoked with template <typename Fn typename Args> constexpr auto apply_type Fn &&fn Args && args & > decltype auto 1 constexpr auto apply_type Fn &&fn Args && args const & > decltype auto 2 constexpr auto apply_type Fn &&fn Args && args && > decltype auto 3 constexpr auto apply_type Fn &&fn Args && args const && > decltype auto 4 Eliminates the payload through the callable keyed by the payload s type The arm receives std in_place_type<T> followed by the payload as apply_type hands it over on copack and choice a tuple like payload s elements form is the row s one signature and trailing arguments follow the content return The callable s result fn Fn && Callable applied on the tag and the payload args Args && Additional arguments appended after the payload s content template <typename Fn typename Args> constexpr auto apply_type Fn &&fn Args && args const > decltype auto 1 Eliminates through the callable keyed by the payload s type return The callable s result fn Fn && Callable invoked with std in_place_type<void> and the trailing arguments args Args && Arguments following the tag template <typename Ret typename Fn typename Args> constexpr auto apply_type_r Fn &&fn Args && args & > Ret 1 constexpr auto apply_type_r Fn &&fn Args && args const & > Ret 2 constexpr auto apply_type_r Fn &&fn Args && args && > Ret 3 constexpr auto apply_type_r Fn &&fn Args && args const && > Ret 4 Eliminates the payload through the callable keyed by the payload s type converting the result to Ret return The callable s result converted to Ret fn Fn && Callable applied on the tag and the payload args Args && Additional arguments appended after the payload s content return The callable s result converted to Ret fn Fn && Callable applied on the tag and the payload args Args && Additional arguments appended after the payload s content template <typename Ret typename Fn typename Args> constexpr auto apply_type_r Fn &&fn Args && args const > Ret 1 Eliminates through the callable keyed by the payload s type converting the result to Ret return The callable s result converted to Ret fn Fn && Callable invoked with std in_place_type<void> and the trailing arguments args Args && Arguments following the tag return The callable s result converted to Ret fn Fn && Callable invoked with std in_place_type<void> and the trailing arguments args Args && Arguments following the tag