26template <std::derived_from<Command> Base,
typename CRTP>
35 std::make_unique<CRTP>(std::move(*
static_cast<CRTP*
>(
this))));
39 WPI_DEPRECATED(
"Use ToPtr() instead")
41 return std::make_unique<CRTP>(std::move(*
static_cast<CRTP*
>(
this)));
CRTP implementation to allow polymorphic decorator functions in Command.
Definition: CommandHelper.h:27
std::unique_ptr< Command > TransferOwnership() &&override
Definition: CommandHelper.h:40
CommandPtr ToPtr() &&override
Definition: CommandHelper.h:33
A state machine representing a complete action to be performed by the robot.
Definition: Command.h:41
A wrapper around std::unique_ptr<Command> so commands have move-only semantics.
Definition: CommandPtr.h:29
Definition: TrapezoidProfileSubsystem.h:12