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

You can do that in C++ by wrapping he type in a new class although it requires some boilerplate depending on which operators you want to support. [0]

You don't have to use all features of C++ - if you prefer a more C like style you can have that.

[0] https://www.boost.org/doc/libs/1_48_0/boost/strong_typedef.h...



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

Search: