ivl 679
ivl/details/core/types/set.hpp
00001 /* This file is part of the ivl C++ library <http://image.ntua.gr/ivl>.
00002    A C++ template library extending syntax towards mathematical notation.
00003 
00004    Copyright (C) 2012 Yannis Avrithis <iavr@image.ntua.gr>
00005    Copyright (C) 2012 Kimon Kontosis <kimonas@image.ntua.gr>
00006 
00007    ivl is free software; you can redistribute it and/or modify
00008    it under the terms of the GNU Lesser General Public License 
00009    version 3 as published by the Free Software Foundation.
00010 
00011    Alternatively, you can redistribute it and/or modify it under the terms 
00012    of the GNU General Public License version 2 as published by the Free 
00013    Software Foundation.
00014 
00015    ivl is distributed in the hope that it will be useful,
00016    but WITHOUT ANY WARRANTY; without even the implied warranty of
00017    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
00018    See the GNU General Public License for more details.
00019 
00020    You should have received a copy of the GNU General Public License 
00021    and a copy of the GNU Lesser General Public License along 
00022    with ivl. If not, see <http://www.gnu.org/licenses/>. */
00023 
00024 #ifndef IVL_CORE_DETAILS_TYPES_SET_HPP
00025 #define IVL_CORE_DETAILS_TYPES_SET_HPP
00026 
00027 namespace ivl {
00028 
00029 namespace types {
00030 
00031 template <class X, class NEXT> struct item {};
00032 
00033 template <class SET, class X>
00034 struct in { };
00035 
00036 template <template<typename, typename> class SET, class Y, class N, class X>
00037 struct in<SET<Y, N>, X>
00038 :
00039 public t_or<t_eq<X, Y>, in<N, X> > { };
00040 
00041 template <class X>
00042 struct in<term, X> : public t_false { };
00043 
00044 template <
00045 class X1 = types::term,
00046 class X2 = types::term,
00047 class X3 = types::term,
00048 class X4 = types::term,
00049 class X5 = types::term,
00050 class X6 = types::term,
00051 class X7 = types::term
00052 > struct set
00053 {
00054         typedef item<X1, item<X2, item<X3, item<X4, item<X5, item<X6, item<X7,
00055                 term> > > > > > > type;
00056 };
00057 
00058 } /* namespace types */
00059 
00060 } /* namespace ivl */
00061 
00062 #endif // IVL_CORE_DETAILS_TYPES_SET_HPP
 All Classes Namespaces Files Functions Variables Typedefs Enumerations