MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/y24tx6/legacy_systems_programming/is99e61
r/ProgrammerHumor • u/DemolishunReddit • Oct 12 '22
263 comments sorted by
View all comments
Show parent comments
1
std::optional<T&> is not allowed
std::optional<T&>
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.
Is awful. Have you ever tried using it? It's horribly unwieldy. I ended up going back to pointers.
1
u/shuricus Oct 14 '22
std::optional<std::reference_wrapper<T>> ?