// 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. // An early version was described in: // Unfinished Business. C/C++ Users Journal Experts Forum, 21, 11 (November 2003). #ifndef TYPELISTALGORITHMS_H #define TYPELISTALGORITHMS_H #include "utils.h" #include "typelist.h" #include "metafunction.h" namespace Tyr { // MarkList // // Marking a typelist according to a predicate. // The result is a parallel typelist of marks (pointer to arrays of char of // a particular bound). We increment the mark to avoid non-positive bounds. // Marks are generally considered boolean, but may be any positive int less // than object size as outlined in Annex B of the std. // These marking algorithms are intended primarily for the implementation of // other algorithms. template class Pred> struct MarkList; template class Pred> struct MarkList,Pred> { typedef typelist::r+1],typename MarkList::R> R; }; template