Hacker News new | past | comments | ask | show | jobs | submit login

Nice articles, some points:

The shared_ptr article should at least mention std::make_shared and why it might be a good idea to use it.

The decltype article could mention std::declval.

The auto article could mention that auto can be combined with 'const' and '&' since auto on its own won't create a reference type. It could also be noted that auto is useful when you're writing generic code and might not know the types you're dealing with.




Thanks for the feedback. I considered adding std::make_shared and left it for subsequent articles. I will be revisiting shared_ptr. I did cover 'const' and '&' with auto and I didn't know about std::declval. I'll study it and consider adding it.

Also, I have covered the case of not knowing the type and yet being able to declare it by using 'auto' in the article on 'decltype'.




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

Search: