Change Log

Introduction

This section is an attempt to document all the changes made to the STLplus library. However, the change log has been restarted for version 3 of the library since the changes for this version are huge. Therefore only the changes since then have been documented.

The official open-source version of STLplus starts at version 2.0 and you can access the change log for all version 2 releases by looking at the version 2 documentation.

Only the numbered versions from 2.0 upwards are available as downloads. The very latest version is only available through CVS and is subject to change. Pre-version 2.0 are not available from SourceForge.

Note: STLplus version 3 is not backwards-compatible with STLplus version 2. You should only make the changeover if you are prepared to do some porting work or if you are starting a new project.

Use at Your Own Risk: STLplus version 3.0 is classified as an alpha release. Although it is based on STLplus, which was a stable release, there is enough reworking for all sorts of errors to have crept in. Furthermore, I have not yet ported any significant applications to version 3, so only small test programs have been written so far.

Changes from Version 3.0 to 3.1

Bug in subsystems/cli_parser

The macro END_CLI_DEFINITIONS contained an error with namespaces - so it would only work if you were "using namespace stlplus". This should now work when using the stlplus:: prefix notation as well.

Bug in subsystems/cli_parser

There was a bug related to the use of a definition_t to define a command-line argument. The bug caused the cli_parser to crash with a segmentation fault due to a null pointer being passed to a std::string.

Built-in messages in subsystems/message_handler

The minimum set of messages (for the cli_handler) has now been built-in to the message_handler so that applications can more easily be built with no message-file handling.

Bug in Windows port of quoted command-line arguments in portability/subprocesses.

This bug resulted in a quoted string being converted by the argument_vector class into a doubled-up string - i.e. "./fred" would get converted into "..//ffrreedd". The bug only manifested on Windows.

Change to kill semantics in portability/subprocesses

A bug fix was submitted by Alistair Low to enable the subprocess classes to kill a whole subprocess tree rather than just the parent process. I have yet to confirm whether this is the behaviour of the Unix port - it should be.

Bug in portability/debug

One of the macros in the debug header had a typo - which broke the debug utilities. The symptom was in DEBUG_TRACE which would result in a compilation error due to a reference to the undefined class stlplus_debug_trace. This has been fixed.

Change to implementation of portability/debug

The string formatting was being done by string-stream classes. I have rewritten it to use the more efficient portability/dprintf.

Changes to subsystems/cli_parser use of susbsystems/ini_manager

The CLI Parser loads default values from the Ini Manager. However, in previous versions, it was possible for a typo to mean that an option was ignored. I have now added error checking so that all variables in the relevant section of the Ini Manager are recognised as command-line options.

An extra error message has been added to messages/stlplus_messages.txt to report this error.

Changes to subsystems/ini_manager to improve error reporting

The Ini Manager now keeps track of which line in the Ini file a value comes from, so that error reporting can report the file name and line number of an error. The method ini_manager::variable_linenumber has been added for this purpose.

Bug Fix in portability/subprocesses

There was a bug in the quoting code for Windows command-lines which resulted in quote marks being added after every character in a string that needed quoting (i.e. contained special characaters). This has been fixed.

Changes from Version 2 to 3.0

Split the library into a Collection

The original STLplus was a single, rather large, library. It has now been split into 5 libraries. So STLplus is now referred to as a Library Collection, containing within it the STLplus containers, portability, persistence, subsystems and strings libraries.

Added the stlplus Namespace

All of the components in the STLplus library collection now have their own namespace - stlplus. Thus, the smart_ptr class is now stlplus::smart_ptr.

Removed TextIO

STLplus had it's own I/O subsystem for historical reasons. That was OK when I was the only user, but a bit much for new users to be expected to accept. I decided that TextIO had to go, but needed to wait for other major changes to justify a change that makes the library not backwards compatible.

STLplus version 3 does not have the TextIO subsystem any more - all functions using TextIO have been rewritten to use IOStream.

Removed string_arithmetic

The string_arithmetic package was an anachronism - it was part of another project which seemed suitable for inclusion into STLplus, but now seems not to fit. So I have removed it.

Renamed error_handler to message_handler

The old name error_handler I think confused people as to the purpose of this component. Since STLplus 3 is not compatible with previous versions, I am taking this opportunity to rename it to better reflect its purpose - message_handler.

Safe Iterators

Iterators in the STL are badly designed - there are several major pitfalls with using them as a result of their design. However, I wanted STLplus to feel like the STL to make it easier to use, so felt I should use the iterator concept despite the problems associated with them. Some of the STLplus components therefore also use iterators.

In STLplus 2 I included some error checking for misuse of iterators. In STLplus 3 I have completed the job - so I have termed the STLplus iterators safe iterators.

Changed Interfaces to enable Namespace Support

The old STLplus used a technique for writing template functions that required external resources to be in the global namespace. This approach is not compatible with placing all of the STLplus into a separate namespace. All these functions have been rewritten to take an extra parameter so that those external resources are now passed as parameters.

This rewrite applies to the persistence library and the strings library.

Persistence Functions Renamed

STLplus 2 relied on overloading the functions dump and restore to implement persistence. However, because of the redesign of the functions discussed above, persistence functions are now passed as parameters to other persistence functions. To avoid ambiguity, all persistence functions now have unique names - dump_type and restore_type. See the persistence library for more information.

Note: the persistence file format is unchanged by this rewrite, so STLplus version 2 files can be read by version 3 and vice versa.

Print and String-Conversion Functions Renamed

STLplus 2 string_utilities also relied on overloading the functions print and to_string to provide printing and formatting functions for whole data structures. However, because of the redesign of the functions discussed above, functions are now passed as parameters to other functions. To avoid ambiguity, all print and string-formatting functions now have unique names - print_type and type_to_string. See the strings library for more information.