view oldclasslib/README.txt @ 12:aab9ff6af791

Strengthen the build hack for non-DOS targets.
author David A. Holland
date Tue, 31 May 2022 00:58:42 -0400
parents 607e3be6bad8
children
line wrap: on
line source

This is the "classlib" distributed with pre-open-source versions of
AnaGram.

It is old and not very well designed. It is still here, and sort of
being maintained, because (1) some of the examples use it, and (2)
somebody out there might even be using it.

It should be considered deprecated. The examples will be migrated away
from it over time; anyone using it in their own code should move to
something else - whether AnaGram's own AGCLIB1 or the STL or whatever.

------------------------------------------------------------

Changes to oldclasslib since the AG 2.01 release:

- Updated the syntax for friend template functions for the current (or
at least recent) dialect of 'standard' C++.

- Added const qualifications in various places to allow use of string
constants. In current C++ string constants have type "const char *";
that was not the case when this code was written.

- Added explicit calls to base class constructors even when they take
no arguments; gcc 3.3 whines if you don't have these.

- Removed the behavior where you can cast a stack<> to T* or a
character_sink to char* to fetch the topmost element. Now you must
call the top() method instead. Apparently the C++ standard says that
having such a cast operator and also having operator[] is ambiguous,
because you can convert the object to a pointer and apply [] to that
as well as using the provided operator[] directly. This seems stupid
bordering on insane, but when compilers start citing the standard at
you there isn't much choice but to go along.

- Added explicit assignment operator definitions in places where gcc
10.x now refuses to produce them automatically. Added missing "const"
to some of the copy constructor arguments.