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

> Imagine if C++ structs were required to be pod and classes were not. Then you could always know that a struct can be trivially allocated/deallocated etc.

static_assert(is_trivial_v<T>)




Unfortunately other people aren’t writing simple C structs they are using the full feature set of C++ and I have to use their code.

So no this doesn’t solve C++ complexity including the initialization problem.




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

Search: