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

I haven't used C++ in about... 12 years. I'll admit ignorance about the updates that have occurred in recently, so I've got a general question: How is the compatibility between different versions? Specifically, would a C++ 11 compiler be able to compile legacy code written for C++ 03?



Yes in 99.9% of cases. The main trouble could come from the angle of accidental move (rvalue cast) somewhere invoking a broken/wrong move constructor or assignment.

Of course, crusty old code can be buggy yet originally working - e.g. relying on implementation defined or undefined behavior. (or even bugs in compiler or standard library implementation)


Short answer is yes (long answer is what the other guy said). The standards committee never makes breaking changes (a big reason why the language is so bloated).




Consider applying for YC's W25 batch! Applications are open till Nov 12.

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

Search: