#pragma once #include template static constexpr std::unique_ptr copy_or_nullptr(const std::unique_ptr& other) { if (other) return std::make_unique(*other); return nullptr; }