15 #ifndef PAAL_TYPE_FUNCTIONS_HPP
16 #define PAAL_TYPE_FUNCTIONS_HPP
18 #include <boost/range.hpp>
20 #include <type_traits>
29 using decay_t =
typename std::decay<T>::type;
32 #define puretype(t) typename std::decay<decltype(t)>::type
35 template <
typename Range>
39 template <
typename Range>
43 template <
typename Range>
48 template <
typename T,
int k>
50 using type = decltype(
51 std::tuple_cat(std::declval<std::tuple<T>>(),
52 std::declval<
typename k_tuple<T, k - 1>::type>()));
56 struct k_tuple<T, 1> {
using type = std::tuple<T>;};
60 template <
typename T,
int k>
61 using k_tuple_t =
typename detail::k_tuple<T, k>::type;
68 template <
typename T1,
typename T2>
77 #endif // PAAL_TYPE_FUNCTIONS_HPP
typename boost::range_value< Range >::type range_to_elem_t
for given range returns type of its element
typename std::decay< T >::type decay_t
short version of std::decay
promote_with_t< T, double > promote_with_double_t
return type after promotion with double
typename detail::k_tuple< T, k >::type k_tuple_t
returns tuple consisting of k times type T
#define puretype(t)
for given expression returns its type with removed const and reference
typename boost::range_difference< Range >::type range_to_diff_type_t
for given collection returns its difference type
typename std::decay< typename std::result_of< F >::type >::type pure_result_of_t
return pure type of function (decays const and reference)
puretype(std::declval< T1 >()+std::declval< T2 >()) promote_with_t
return type obtained after adding values of given types
typename boost::range_reference< Range >::type range_to_ref_t
for given range returns type of its reference