Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Could you provide an example?


You have to add special handling for the case that T == std::reference_wrapper<T> so you can call .get() on it to expose the underlying value. In the case of std::optional vs a pointer type (raw or smart) you can consistently use operator* to get to the underlying value. I think this is what was meant.


also if you are doing something like decltype( *val ) to get at the underlying type.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: