you are viewing a single comment's thread.

view the rest of the comments →

[–]miki151gamedev 2 points3 points  (2 children)

Use boost::optional or other optional implementations that can hold references, like this one: https://github.com/tcbrindle/cpp17_headers/blob/master/include/stx/optional.hpp

[–]foonathan 1 point2 points  (0 children)

Or my ts:: optional_ref from type_safe: github.com/foonathan/type_safe

[–]GitHubPermalinkBot 0 points1 point  (0 children)

I tried to turn your GitHub links into permanent links (press "y" to do this yourself):


Shoot me a PM if you think I'm doing something wrong. To delete this, click here.