C++ decimal data types

The classes from the Decimal TR are not implemented for all compilers. Some compilers, e.g., gcc, implement the C Decimal TR and provide the corresponding extensions in C++, too. In the past there was an open source implementation for the C++ Decimal TR available but I failed to locate it. If your compiler doesn’t support the decimal types, your best option is probably to create a wrapper for IBM’s decNumber library.

To improve the situation in the future of C++, I have created a plan to update the TR and I’m going to turn the current TR into a complete proposal ready for the next C++ committee meeting (in April in Bristol), trying to get it adopted into the C++ standard, possibly into the revision planned for 2014. The implementation I have is part of my regular work and it isn’t up to me to decide whether it is can be made available publically although there is some hope that it can be open sourced at some point.

Leave a Comment