tmp.hh 365 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#pragma once

#include <utility>

namespace polymesh
{
// small template metaprogramming
namespace tmp
{
template <class FuncT, class ArgT>
struct result_of
{
    using type = typename std::decay<decltype((std::declval<FuncT>())(std::declval<ArgT>()))>::type;
};

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