/*-----------------------------------------------------------------------------+ 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_ICL_INTERVAL_TRAITS_HPP_JOFA_100926 #define BOOST_ICL_INTERVAL_TRAITS_HPP_JOFA_100926 #include #include #include namespace boost{ namespace icl { template struct interval_traits; template struct domain_type_of > { typedef typename interval_traits::domain_type type; }; //------------------------------------------------------------------------------ //- Adapter class //------------------------------------------------------------------------------ template struct interval_traits { typedef interval_traits type; typedef typename domain_type_of::type domain_type; static Type construct(const domain_type& lo, const domain_type& up); static domain_type upper(const Type& inter_val); static domain_type lower(const Type& inter_val); }; template struct difference_type_of > { typedef typename interval_traits::domain_type domain_type; typedef typename difference_type_of::type type; }; template struct size_type_of > { typedef typename interval_traits::domain_type domain_type; typedef typename size_type_of::type type; }; }} // namespace boost icl #endif