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

No, it's actually undecidable. C++ templated have been determined to be turing complete, which means that template instantiations can encode the halting problem. Determining whether a program compiles or not therefore requires solving the halting problem.

In practice, compilers work around this by limiting template instantiation depth.



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

Search: