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_HAS_INVERSE_HPP_JOFA_090205
9 #define BOOST_ICL_TYPE_TRAITS_HAS_INVERSE_HPP_JOFA_090205
11 #include <boost/type_traits/is_signed.hpp>
12 #include <boost/type_traits/is_floating_point.hpp>
14 namespace boost{ namespace icl
17 template <class Type> struct has_inverse
19 typedef has_inverse<Type> type;
20 BOOST_STATIC_CONSTANT(bool,
21 value = ( boost::is_signed<Type>::value
22 || is_floating_point<Type>::value ) );
25 }} // namespace boost icl
27 #endif // BOOST_ICL_TYPE_TRAITS_HAS_INVERSE_HPP_JOFA_090205