News for hackers. Stuff that matters.
Re:Should I Use Signed or Unsigned Ints? (Part 2) by cpeterso on Tuesday September 01, 2015 @11:53PM (#10157339)
I wish C++ had a better way of representing quantities, something like Pascal's or Ada's ranged integer types. I started to write a C++ template class to represent strongly-typed ints. The class grew to 100+ LOC to handle all the expect operator overloads. Then I gave up. :) C++11 gave us strongly-typed enums and the means to specify the enum's underlying size (like enum class Color : unsigned short). Why can't they give us strongly-typed ints with something like int class Fahrenheit?

There are no comments on this comment yet.