Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r65470 - sandbox/itl/boost/itl/detail
From: afojgo_at_[hidden]
Date: 2010-09-19 17:12:10


Author: jofaber
Date: 2010-09-19 17:12:06 EDT (Sun, 19 Sep 2010)
New Revision: 65470
URL: http://svn.boost.org/trac/boost/changeset/65470

Log:
Refactoring: Moving some functions to interval container classes in order to ensure class invariants. Stable{msvc-9.0, gcc-3.4.4}
Added:
   sandbox/itl/boost/itl/detail/on_neutric.hpp (contents, props changed)

Added: sandbox/itl/boost/itl/detail/on_neutric.hpp
==============================================================================
--- (empty file)
+++ sandbox/itl/boost/itl/detail/on_neutric.hpp 2010-09-19 17:12:06 EDT (Sun, 19 Sep 2010)
@@ -0,0 +1,43 @@
+/*-----------------------------------------------------------------------------+
+Copyright (c) 2010-2010: 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 BOOST_ITL_TYPE_TRAITS_ON_NEUTRIC_HPP_JOFA_100915
+#define BOOST_ITL_TYPE_TRAITS_ON_NEUTRIC_HPP_JOFA_100915
+
+namespace boost{ namespace itl
+{
+
+template<class Type, class Combiner, bool absorbs_neutrons>
+struct on_neutric; //JODO rename
+
+template<class Type, class Combiner>
+struct on_neutric<Type, Combiner, false>
+{
+ typedef on_neutric type;
+ typedef typename Type::codomain_type codomain_type;
+
+ static bool is_absorbable(const codomain_type&){ return false; }
+};
+
+template<class Type, class Combiner>
+struct on_neutric<Type, Combiner, true>
+{
+ typedef on_neutric type;
+ typedef typename Type::codomain_type codomain_type;
+ typedef typename Type::codomain_combine codomain_combine;
+
+ static bool is_absorbable(const codomain_type& co_value)
+ {
+ return co_value == Combiner::neutron();
+ }
+};
+
+}} // 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