|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r55876 - sandbox/itl/boost/itl/type_traits
From: afojgo_at_[hidden]
Date: 2009-08-30 10:41:50
Author: jofaber
Date: 2009-08-30 10:41:49 EDT (Sun, 30 Aug 2009)
New Revision: 55876
URL: http://svn.boost.org/trac/boost/changeset/55876
Log:
Adding type traits.
Added:
sandbox/itl/boost/itl/type_traits/is_concept_equivalent.hpp (contents, props changed)
sandbox/itl/boost/itl/type_traits/is_element_container.hpp (contents, props changed)
Added: sandbox/itl/boost/itl/type_traits/is_concept_equivalent.hpp
==============================================================================
--- (empty file)
+++ sandbox/itl/boost/itl/type_traits/is_concept_equivalent.hpp 2009-08-30 10:41:49 EDT (Sun, 30 Aug 2009)
@@ -0,0 +1,28 @@
+/*-----------------------------------------------------------------------------+
+Copyright (c) 2008-2009: Joachim Faulhaber
++------------------------------------------------------------------------------+
+ Distributed under the Boost Software License, Version 1.0.
+ (See accompanying file LICENCE.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt)
++-----------------------------------------------------------------------------*/
+#ifndef __itl_type_traits_is_concept_equivalent_JOFA_090830_H__
+#define __itl_type_traits_is_concept_equivalent_JOFA_090830_H__
+
+#include <boost/mpl/and.hpp>
+
+namespace boost{ namespace itl
+{
+
+ template<template<class>class IsConcept, class LeftT, class RightT>
+ struct is_concept_equivalent
+ {
+ typedef is_concept_equivalent<IsConcept, LeftT, RightT> type;
+ static const bool value =
+ mpl::and_<IsConcept<LeftT>, IsConcept<RightT> >::value;
+ };
+
+}} // namespace boost itl
+
+#endif
+
+
Added: sandbox/itl/boost/itl/type_traits/is_element_container.hpp
==============================================================================
--- (empty file)
+++ sandbox/itl/boost/itl/type_traits/is_element_container.hpp 2009-08-30 10:41:49 EDT (Sun, 30 Aug 2009)
@@ -0,0 +1,40 @@
+/*-----------------------------------------------------------------------------+
+Copyright (c) 2008-2009: Joachim Faulhaber
++------------------------------------------------------------------------------+
+ Distributed under the Boost Software License, Version 1.0.
+ (See accompanying file LICENCE.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt)
++-----------------------------------------------------------------------------*/
+#ifndef __itl_type_traits_is_element_container_JOFA_090830_H__
+#define __itl_type_traits_is_element_container_JOFA_090830_H__
+
+#include <boost/mpl/and.hpp>
+#include <boost/mpl/or.hpp>
+#include <boost/mpl/not.hpp>
+#include <boost/itl/type_traits/is_interval_container.hpp>
+#include <boost/itl/type_traits/is_set.hpp>
+
+namespace boost{ namespace itl
+{
+ template <class Type>
+ struct is_element_container
+ {
+ typedef is_element_container<Type> type;
+ static const bool value =
+ mpl::and_<is_set<Type>, mpl::not_<is_interval_container<Type> > >::value;
+ };
+
+ template<class Type>
+ struct is_element_map
+ {
+ typedef is_element_map<Type> type;
+ static const bool value =
+ mpl::and_<is_map<Type>, mpl::not_<is_interval_container<Type> > >::value;
+ };
+
+
+}} // namespace boost itl
+
+#endif
+
+
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk