I don’t use perfect forwarding often and always forget to put Args std::forward<Args>(args)... Just a reminder for the future me.

template<typename T, typename... Args>
std::unique_ptr<T> make_unique(Args&&... args)
{
    return std::unique_ptr<T>(
        new T(std::forward<Args>(args)...));
}

Next - Previous