Chris@16: /*-----------------------------------------------------------------------------+ Chris@16: Copyright (c) 2010-2010: Joachim Faulhaber Chris@16: +------------------------------------------------------------------------------+ Chris@16: Distributed under the Boost Software License, Version 1.0. Chris@16: (See accompanying file LICENCE.txt or copy at Chris@16: http://www.boost.org/LICENSE_1_0.txt) Chris@16: +-----------------------------------------------------------------------------*/ Chris@16: #ifndef BOOST_ICL_TYPE_TRAITS_ON_ABSORBTION_HPP_JOFA_100915 Chris@16: #define BOOST_ICL_TYPE_TRAITS_ON_ABSORBTION_HPP_JOFA_100915 Chris@16: Chris@16: namespace boost{ namespace icl Chris@16: { Chris@16: Chris@16: template Chris@16: struct on_absorbtion; Chris@16: Chris@16: template Chris@16: struct on_absorbtion Chris@16: { Chris@16: typedef on_absorbtion type; Chris@16: typedef typename Type::codomain_type codomain_type; Chris@16: Chris@16: static bool is_absorbable(const codomain_type&){ return false; } Chris@16: }; Chris@16: Chris@16: template Chris@16: struct on_absorbtion Chris@16: { Chris@16: typedef on_absorbtion type; Chris@16: typedef typename Type::codomain_type codomain_type; Chris@16: typedef typename Type::codomain_combine codomain_combine; Chris@16: Chris@16: static bool is_absorbable(const codomain_type& co_value) Chris@16: { Chris@16: return co_value == Combiner::identity_element(); Chris@16: } Chris@16: }; Chris@16: Chris@16: }} // namespace boost icl Chris@16: Chris@16: #endif Chris@16: Chris@16: