Mercurial > ~dholland > hg > ag > index.cgi
view oldclasslib/README.txt @ 8:ec2b657edf13
Add explicit lint-comment-style fallthrough annotations.
GCC now assumes that if you don't have these you're making a mistake,
which is annoying.
XXX: This changeset updates the AG output files only (by hand) and is
XXX: abusive - rebuilding them will erase the change. However, I need
XXX: to get things to build before I can try to get AG to issue the
XXX: annotations itself, so this seems like a reasonable expedient.
author | David A. Holland |
---|---|
date | Mon, 30 May 2022 23:51:43 -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.