DataReel 6.4.3 C++ transition examples (examples_modern), 11/30/2026
=====================================================================

Every example program of DataReel 6.4 (examples_threads,
examples_general, examples_database, examples_socket) has a modern
C++11, C++17 or C++20 equivalent here. The guide that shows them side
by side with the legacy programs is docs/cpp_transition/index.html.

DataReel 6.4.3 is the legacy release (bug fixes and security updates
only). These programs change nothing in the library: they show how the
code AROUND DataReel moves to the C++ standard library, and which
DataReel classes stay because the standard has no replacement (the
object database, sockets, TLS and the protocol clients).

Layout
------
  threads/NAME/modern.cpp    examples_threads/NAME
  general/NAME/modern.cpp    examples_general/NAME
  database/NAME/modern.cpp   examples_database/NAME
  socket/NAME/modern.cpp     examples_socket/NAME
  */fuzz/*.cpp               the fuzz targets, one modern file for each
  socket/common/*.h          helpers shared by the socket examples
                             (a scripted loopback server, TLS test
                             server, block framing, reply parsers)

A legacy client and server pair is one modern program that runs both
ends in one process on 127.0.0.1, and the protocol clients (SMTP,
POP3, IMAP, FTP, HTTP, HTTPS, telnet) talk to a scripted local server
when they are run with no arguments. Every program runs as a self test
and returns 0 when it works; none of them needs a network, an outside
server or a key press. Pass arguments to use real servers (see each
program's header).

Each file's header says:
  C++ Standard   the oldest standard it builds with (C++11 to C++20)
  Libraries      standard library only, DataReel 6.4.3, or DataReel
                 6.4.3 built with the 7.x features
  Platforms      portable, or POSIX only
  Legacy Program the legacy source files it replaces

Building
--------
  cmake -S examples_modern -B build-modern -DCMAKE_BUILD_TYPE=Release
  cmake --build build-modern -j

The default standard is C++20; -DCMAKE_CXX_STANDARD=17 builds the
C++17 subset (newer ones are skipped with a message). The DataReel
6.4.3 library is built from the parent folder with the same standard.
Add -DDATAREEL7_FEATURES_DIR=/path/to/datareel-7.4 (7.4 or later) for
database/vector_index, database/replication_6x and
socket/vector_client.

Examples that use only the standard library build alone:
  g++ -std=c++11 -pthread threads/condition/modern.cpp -o condition

Testing
-------
  examples_modern/run_modern_tests.sh [DATAREEL7_SOURCE_DIR]

builds every example with each standard from the one it names up to
C++20 (C++11 and C++14 with the compiler, C++17 and C++20 with CMake),
runs every C++20 program in build-modern/run with a time limit and
prints PASS or FAIL for each. With a 7.x source tree and the openssl
program it also runs the replication self test with throwaway
certificates. 11/30/2026 on RHEL 10.3 (GCC 14.4, OpenSSL 3.5.9) with
the DataReel 7.5 tree: 108 passed, 0 failed. Windows 11, Visual Studio
2026, Schannel, C++20: the 69 examples not marked POSIX (or needing
the 7.x features) build, and all 69 run and pass; https_client,
ssl_server and ssl_verify_cert need their .pem files made with openssl
first (Schannel cannot make keys), and the programs need NOMINMAX
(set by CMakeLists.txt) because windows.h defines min and max.

After an example changes, regenerate the guide's pages:
  python3 docs/bin/make_transition_html.py build-modern/run

Library fix
-----------
C++20 removed operator>>(std::istream &, char *). UString's stream
input used it, so the 6.4.2 library did not build with -std=c++20.
In 6.4.3 src/ustring.cpp reads into a char array instead; the
library builds with C++17 (the CMake default) and C++20.
