OKlibrary  0.2.1.6
concept_tag.hpp
Go to the documentation of this file.
00001 // Oliver Kullmann, 30.12.2005 (Swansea)
00002 /* Copyright 2005 - 2007 Oliver Kullmann
00003 This file is part of the OKlibrary. OKlibrary is free software; you can redistribute
00004 it and/or modify it under the terms of the GNU General Public License as published by
00005 the Free Software Foundation and included in this library; either version 3 of the
00006 License, or any later version. */
00007 
00013 #ifndef CONCEPTTAG_ialLkj7
00014 #define CONCEPTTAG_ialLkj7
00015 
00016 #include <boost/mpl/has_xxx.hpp>
00017 
00018 namespace OKlib {
00019   namespace Concepts {
00020     namespace traits {
00021 
00027       namespace implementation_concept_tag {
00028         BOOST_MPL_HAS_XXX_TRAIT_DEF(concept_tag)
00029           template <bool has_concept_tag, typename T>
00030         struct get_concept_tag {};
00031         template <typename T>
00032         struct get_concept_tag<true, T> {
00033           typedef typename T::concept_tag type;
00034         };
00035       }
00036       template <class T>
00037       struct concept_tag : implementation_concept_tag::get_concept_tag<implementation_concept_tag::has_concept_tag<T>::value, T> {};
00038 
00039     }
00040 
00041   }
00042 
00043 }
00044 
00045 #endif