std::vector> a; std::optional>& test(int b) { a.clear(); a.push_back(b); if(b) return a; else return std::nullopt; }