11 #include <type_traits>
14 #include "frc2/command/Command.h"
24 template <
typename Base,
typename CRTP,
25 typename = std::enable_if_t<std::is_base_of_v<Command, Base>>>
33 std::unique_ptr<Command> TransferOwnership() &&
override {
34 return std::make_unique<CRTP>(std::move(*static_cast<CRTP*>(
this)));