/
usr
/
include
/
boost
/
icl
/
type_traits
/
/usr/include/boost/icl/type_traits
mkdir
upload
Name
Size
Mode
Actions
absorbs_identities.hpp
815
0644
edit
dl
rm
adds_inversely.hpp
998
0644
edit
dl
rm
codomain_type_of.hpp
1837
0644
edit
dl
rm
difference.hpp
701
0644
edit
dl
rm
difference_type_of.hpp
3343
0644
edit
dl
rm
domain_type_of.hpp
1442
0644
edit
dl
rm
element_type_of.hpp
2959
0644
edit
dl
rm
has_inverse.hpp
1041
0644
edit
dl
rm
has_set_semantics.hpp
1328
0644
edit
dl
rm
identity_element.hpp
1093
0644
edit
dl
rm
infinity.hpp
4499
0644
edit
dl
rm
interval_type_default.hpp
2095
0644
edit
dl
rm
interval_type_of.hpp
1467
0644
edit
dl
rm
is_associative_element_container.hpp
1139
0644
edit
dl
rm
is_asymmetric_interval.hpp
1819
0644
edit
dl
rm
is_combinable.hpp
18014
0644
edit
dl
rm
is_concept_equivalent.hpp
1345
0644
edit
dl
rm
is_container.hpp
1952
0644
edit
dl
rm
is_continuous.hpp
933
0644
edit
dl
rm
is_continuous_interval.hpp
866
0644
edit
dl
rm
is_discrete.hpp
2109
0644
edit
dl
rm
is_discrete_interval.hpp
858
0644
edit
dl
rm
is_element_container.hpp
1781
0644
edit
dl
rm
is_icl_container.hpp
1177
0644
edit
dl
rm
is_increasing.hpp
978
0644
edit
dl
rm
is_interval.hpp
5823
0644
edit
dl
rm
is_interval_container.hpp
1486
0644
edit
dl
rm
is_interval_joiner.hpp
849
0644
edit
dl
rm
is_interval_separator.hpp
861
0644
edit
dl
rm
is_interval_splitter.hpp
857
0644
edit
dl
rm
is_key_container_of.hpp
2879
0644
edit
dl
rm
is_map.hpp
800
0644
edit
dl
rm
is_numeric.hpp
2859
0644
edit
dl
rm
is_set.hpp
869
0644
edit
dl
rm
is_total.hpp
780
0644
edit
dl
rm
no_type.hpp
654
0644
edit
dl
rm
predicate.hpp
1480
0644
edit
dl
rm
rep_type_of.hpp
2162
0644
edit
dl
rm
segment_type_of.hpp
1454
0644
edit
dl
rm
size.hpp
693
0644
edit
dl
rm
size_type_of.hpp
2189
0644
edit
dl
rm
succ_pred.hpp
2365
0644
edit
dl
rm
to_string.hpp
1441
0644
edit
dl
rm
type_to_string.hpp
3494
0644
edit
dl
rm
unit_element.hpp
1519
0644
edit
dl
rm
value_size.hpp
1685
0644
edit
dl
rm
Edit:
/usr/include/boost/icl/type_traits/infinity.hpp
(4499B)
/*-----------------------------------------------------------------------------+ Copyright (c) 2010-2011: 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_TYPE_TRAITS_INFINITY_HPP_JOFA_100322 #define BOOST_ICL_TYPE_TRAITS_INFINITY_HPP_JOFA_100322 #include <string> #include <boost/static_assert.hpp> #include <boost/icl/type_traits/is_numeric.hpp> #include <boost/icl/type_traits/rep_type_of.hpp> #include <boost/icl/type_traits/size_type_of.hpp> #include <boost/mpl/and.hpp> #include <boost/mpl/if.hpp> namespace boost{ namespace icl { template<class Type> struct has_std_infinity { typedef has_std_infinity type; BOOST_STATIC_CONSTANT(bool, value = ( is_numeric<Type>::value && std::numeric_limits<Type>::has_infinity ) ); }; template<class Type> struct has_max_infinity { typedef has_max_infinity type; BOOST_STATIC_CONSTANT(bool, value = ( is_numeric<Type>::value && ! std::numeric_limits<Type>::has_infinity ) ); }; //------------------------------------------------------------------------------ template <class Type, bool has_std_inf=false, bool has_std_max=false> struct get_numeric_infinity; template <class Type, bool has_std_max> struct get_numeric_infinity<Type, true, has_std_max> { typedef get_numeric_infinity type; static Type value() { return (std::numeric_limits<Type>::infinity)(); } }; template <class Type> struct get_numeric_infinity<Type, false, true> { typedef get_numeric_infinity type; static Type value() { return (std::numeric_limits<Type>::max)(); } }; template <class Type> struct get_numeric_infinity<Type, false, false> { typedef get_numeric_infinity type; static Type value() { return Type(); } }; template <class Type> struct numeric_infinity { typedef numeric_infinity type; static Type value() { return get_numeric_infinity< Type , has_std_infinity<Type>::value , has_max_infinity<Type>::value >::value(); } }; //------------------------------------------------------------------------------ template<class Type, bool has_numeric_inf, bool has_repr_inf, bool has_size, bool has_diff> struct get_infinity; template<class Type, bool has_repr_inf, bool has_size, bool has_diff> struct get_infinity<Type, true, has_repr_inf, has_size, has_diff> { typedef get_infinity type; static Type value() { return numeric_infinity<Type>::value(); } }; template<class Type, bool has_size, bool has_diff> struct get_infinity<Type, false, true, has_size, has_diff> { typedef get_infinity type; static Type value() { return Type(numeric_infinity<typename Type::rep>::value()); } }; template<class Type, bool has_diff> struct get_infinity<Type, false, false, true, has_diff> { typedef get_infinity type; typedef typename Type::size_type size_type; static Type value() { return Type(numeric_infinity<size_type>::value()); } }; template<class Type> struct get_infinity<Type, false, false, false, true> { typedef get_infinity type; typedef typename Type::difference_type difference_type; static Type value() { return identity_element<difference_type>::value(); } }; template<class Type> struct get_infinity<Type, false, false, false, false> { typedef get_infinity type; static Type value() { return identity_element<Type>::value(); } }; template <class Type> struct infinity { typedef infinity type; static Type value() { return get_infinity< Type , is_numeric<Type>::value , has_rep_type<Type>::value , has_size_type<Type>::value , has_difference_type<Type>::value >::value(); } }; template <> struct infinity<std::string> { typedef infinity type; static std::string value() { return std::string(); } }; }} // namespace boost icl #endif
Save
cmd:
run