/* # Copyright (c) 2009 - OpenSLX Project, Computer Center University of Freiburg # # This program is free software distributed under the GPL version 2. # See http://openslx.org/COPYING # # If you have any feedback please consult http://openslx.org/feedback and # send your suggestions, praise, or complaints to feedback@openslx.org # # General information about OpenSLX can be found at http://openslx.org/ # -------------------------------------------------------------------------- # detail/typeList.h: # - Compile-time metaprogramming facilities: Type Lists and Member Check # -------------------------------------------------------------------------- */ #ifndef TYPELIST_H_ #define TYPELIST_H_ namespace input_policy { namespace detail { ///////////////////////////////////////////////////////////////////////// // TypeList, Contains, EmptyList: // This class is autogenerated by gen/gen_typeList.cpp ///////////////////////////////////////////////////////////////////////// #include "typeList_autogen.h" ///////////////////////////////////////////////////////////////////////// // Type-level functions that do not need to be autogenerated as they // do not depend on the maximum number of entries: // // ForAnyInTypeList::value == true // if there is any entry E in List for which // Predicate::apply::value == true ///////////////////////////////////////////////////////////////////////// template struct ForAnyInTypeList { static const bool value = Predicate::template apply::value || ForAnyInTypeList::value; }; template struct ForAnyInTypeList { static const bool value = false; }; ///////////////////////////////////////////////////////////////////////// // ForAllInTypeList::value == true // if there is not any entry E in List for which // Predicate::apply::value == false ///////////////////////////////////////////////////////////////////////// template struct ForAllInTypeList { static const bool value = Predicate::template apply::value && ForAllInTypeList::value; }; template struct ForAllInTypeList { static const bool value = true; }; } } #endif /* TYPELIST_H_ */