Tyr Library

This page contains source code for Semantics Consulting's Tyr library.

What is the Tyr Library?

The Tyr library is an outgrowth of the code that accompanied my "Common Knowledge" C/C++ Users Journal columns and this site's (now discontinued) "Once, Weakly" web column.  Eventually, the complexity and redundancy of maintaining totally separate applications became annoying enough to force me to consider establishing a more standard environment: the Tyr library.

In answer to many questions I've received on the subject:  Yes, the name Tyr is a joke poking fun at the naming of Andrei Alexandrescu's Loki library.  (Just consider the relative merits of Tyr and Loki.)  Note, however, that Loki is a production-quality library, whereas Tyr is entirely experimental.

Each source file should contain a copyright notice similar to the following:
// Semantics Consulting's Tyr Library
// http://www.semantics.org
//
// Copyright (c) 2003 by Stephen C. Dewhurst
//
// Permission to use, copy, modify, distribute, and sell this software
// for any purpose is hereby granted without fee, provided that the above
// copyright notice appears in all copies and that both that copyright
// notice and this permission notice appear in supporting documentation.
// The author makes no representations about the suitability of this
// software for any purpose. It is provided "as is" without express
// or implied warranty.
Some warnings:  First, these facilities were developed primarily to illustrate C++ programming techniques, and are not necessarily generally useful (some are even kind of weird).  Second, a lot of the code employs template features that are not handled well by some C++ compilers.  If you have problems with some of the template code, please check it first with a highly standard compliant compiler before making a bug report.  As I get time to work on the code, I hope to port it to less-compliant compilers.

How Can I Get a Copy?

The individual files from the library are available below.  Alternatively, you may download a zip of the whole library:
A quick test program for the library is included in main.cpp.  Simply unzipping the files into a directory and issuing a "CC main.cpp" (or the local equivalent) should result in an executable.  The README.txt file may also have some more-or-less useful information.

What's in the Library?

STL

Compile-Time Type Manipulation

Extended-Precision Compile-Time Arithmetic

Patterns

Other Miscellaneous Files

Semantics Consulting Home
Copyright © 2004 by Stephen C. Dewhurst