1 /*-----------------------------------------------------------------------------+
2 Copyright (c) 2008-2009: Joachim Faulhaber
3 +------------------------------------------------------------------------------+
4 Distributed under the Boost Software License, Version 1.0.
5 (See accompanying file LICENCE.txt or copy at
6 http://www.boost.org/LICENSE_1_0.txt)
7 +-----------------------------------------------------------------------------*/
8 #ifndef BOOST_ICL_TYPE_TRAITS_IS_DISCRETE_HPP_JOFA_100410
9 #define BOOST_ICL_TYPE_TRAITS_IS_DISCRETE_HPP_JOFA_100410
12 #include <boost/config.hpp> // For macro BOOST_STATIC_CONSTANT
13 #include <boost/mpl/and.hpp>
14 #include <boost/mpl/not.hpp>
18 #pragma warning(disable:4913) // user defined binary operator ',' exists but no overload could convert all operands, default built-in binary operator ',' used
21 #include <boost/detail/is_incrementable.hpp>
27 #include <boost/type_traits/is_integral.hpp>
28 #include <boost/type_traits/is_floating_point.hpp>
29 #include <boost/icl/type_traits/rep_type_of.hpp>
30 #include <boost/icl/type_traits/is_numeric.hpp>
32 namespace boost{ namespace icl
34 template <class Type> struct is_discrete
36 typedef is_discrete type;
37 BOOST_STATIC_CONSTANT(bool,
41 boost::detail::is_incrementable<Type>
46 mpl::not_<has_rep_type<Type> >
47 , is_non_floating_point<Type>
52 , is_discrete<typename rep_type_of<Type>::type>
60 }} // namespace boost icl