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

Modern clang (usually, there are edge cases) gives pretty good error messages over all. And like you point out, if you use constexpr you get even better messages. Hell, I watched some cppcon videos over the weekend and learned that clang can even detect out of scope access of temporaries when in a constexpr (but not otherwise sadly), and also that in many cases, a lot more of a program can probably be constexpr than we might think.

The talks were by Jason Turner, who has an ARM emulator implemented entirely as constexprs and a test suite that runs at compile time (so if it compiled, the tests passed). Obviously for actually interacting with it, its not running at compile time, but the logic has the ability to run at compile time, which is pretty cool.



Jason Turner has very cool talks, check the C64 one if you still haven't watched it.


I haven’t watched that one yet, thanks for the recommendation! I’ll give it a look tonight.




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

Search: