// 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. // Described in Unfinished Business. C/C++ Users Journal Experts Forum, 21, 11 (November 2003). #ifndef METAFUNCTION_H #define METAFUNCTION_H namespace Tyr { // These are adapters for compile-time predicates and comparitors, // similar in concept to STL function object adapters. // // The convention used here is that a compile time predicate or comparitor // records its result as a nested value "r" that can be converted to bool. // Use of the adapters is a little clunky. For example, to negate a predicate // called APred it's necessary to use the following syntax: Not1::Adapted. // Negate a unary predicate. template