2017-03-17 9:17 GMT+01:00 Attila Szenczi via Boost
Hello!
I am asking for some feedback if my library idea is good enough to be part of boost if it will meet the requirements.
C++20(?) contracts will be great, it will allow us to write cleaner interfaces, but i don't feel like it solve every issue i would like to solve.
No, they won't. In particular, there will be no support for invariants. But also, it is not that clear that they will make it into C++20.
Do you think it would be a good addition to boost? I appreciate any feedback!
Your library matches close to constrained_value, that has been a candidate for Boost some time ago. Maybe you should check and compare with the author: http://rk.hekko.pl/constrained_value/ Your library -- it looks like it tries to specialize more for type int. A similar functionalit is available in the recently reviewed safe_numerics library. In documentation it even discusses the case like yours, and similar optimizations. You may wish to check it out: https://github.com/robertramey/safe_numerics/ Regards, &rzej;