tmp.hh 363 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
#pragma once

#include <utility>

namespace polymesh
{
// small template metaprogramming
namespace tmp
{
template <class FuncT, class ArgT>
struct result_of
{
Philip Trettner's avatar
Philip Trettner committed
13
    using type = typename std::decay<decltype(std::declval<FuncT>()(std::declval<ArgT>()))>::type;
14
15
16
17
18
19
};

template <class FuncT, class ArgT>
using result_type_of = typename result_of<FuncT, ArgT>::type;
}
}