C++ has a wide ecosystem. One of our key goals with C++Builder is to ensure you can take advantage of the libraries other C++ developers write. With each release we’ve been working on the RTL and STL to ensure it is of a high quality and has great compatibility – exactly what you need if you’re upgrading projects, or you want to pull in C++ source code from a library online.
One great demonstration of this is the increasing number of (often complex) open source C++ libraries we’re making available in GetIt, our package manager.
10.4.2 has five new libraries available, making up fifteen open-source libraries in total – steadily increasing with each release. And these are amazing libraries.
- Microsoft C++ Core Guidelines Support Library
The C++ standards committee maintains its recommendation for how to use modern C++ effectively – the core guidelines. This library, written by Microsoft, contains a set of types and methods that help you write C++ code using those guidelines. It includes items like span, based on std::span but with bounds checking; not_null, forcing a smart pointer to never hold null values; precondition and postcondition assertions (expects and ensures); stack and heap arrays; and much more – these are just a few that I personally find useful.
You can read more about the useful methods and types in GSL readme… and now you can use these in C++Builder! - Google Test
We are often asked about test frameworks for C++Builder. We recommend DUnit, which supports C++, and Boost also includes Boost::test. However, Google Test is very well-known and includes the Google Mocks framework for object mocking.
This is a complex library, and not only is it useful for you to have in GetIt, including it is a clear demonstration of the quality of the 10.4.2 release. - xtl
Xtl contains many useful containers and algorithms used by the xtensor framework (one we’re working on) often used in finance – in fact, it is part of the xtensor quant stack. If you’re looking for high-performance C++, this is a great start. - ACE/TAO: cross-platform CORBA messaging library
ACE/TAO is one of the largest and most complex libraries — and also one that many customers ask us about. Over the past year, we’ve done a significant amount of work focusing specifically on this library. Its inclusion is a clear demonstration of the compatibility that 10.4.2 gives you. We also expect that many C++Builder users will want to use ACE/TAO, perhaps to upgrade projects from several versions ago. We’re very happy to have it on GetIt! - {fmt} Safe and very fast formatting for C++
C standard IO and C++ streams are famous for being difficult to use and often unsafe. {fmt} is a very popular alternative with elegant syntax, compile-time errors, strong testing, and excellent performance. Here are some code snippets taken from their readme:
[crayon-676dc678eee66041954771/]
which prints:
[crayon-676dc678eee74447478903/]
Or an example of passing the wrong type, which may have bitten you in your code before:
[crayon-676dc678eee77793271471/]
This gives a compile-time error.
Check out the readme here: it has impressive code samples and benchmarks. This library is pending some minor final work, but is coming soon for you to use in C++Builder!
These key, useful open source libraries give immense value to your projects. I personally am especially excited to see ACE/TAO (often requested), the Guidelines Support Library, and {fmt}. Remember that you too can add any open source C++ library to your code with C++Builder: we’ve worked hard on compatibility and quality to make sure you can use whatever code you need.
Of course, that’s not all! GetIt also includes Boost (classic, Win32 clang, Win64 clang), EasyBMP, Eigen linear algebra and math framework, the Expat and TinyXML XML parsers, libsimdpp (fast math), NemaTode (NMEA and GPS), SMHasher (hash functions) and SDL2 (great for writing games!)
These libraries are all open source and you can find our repository with them here, on Assembla.
Overview
C++Builder has had steady work on compatibility and robustness to ensure your code works well when you upgrade, and that you can use external C++ code easily – a great benefit for your software. 10.4.2 shows the work well, with the addition of some both really useful and technically complex libraries that demonstrate the improvements this release. We hope the libraries will be beneficial to your projects! And even apart from these libraries, upgrade to 10.4.2 to make use of the improved quality for your software, as well as some of the other improvements this release – linker memory, code completion, and more.
Check out FastMath if you need faster calculations that don’t need full accuracy.
Know more about STL’s std::find C++ method to get a hint on how to supercharge your productivity while you write code.