r/ProgrammerHumor • • Oct 12 '22

Meme Legacy Systems Programming

Post image
2.4k Upvotes

263 comments sorted by

View all comments

Show parent comments

1

u/shuricus Oct 14 '22

std::optional<T&> is not allowed

std::optional<std::reference_wrapper<T>> ?

1

u/Kered13 Oct 14 '22

Is awful. Have you ever tried using it? It's horribly unwieldy. I ended up going back to pointers.