refs #624 Use std alias traits.

This commit is contained in:
Mathew Sutcliffe
2016-03-20 21:50:41 +00:00
parent 23a7f9b719
commit a8fc899219
17 changed files with 47 additions and 47 deletions

View File

@@ -187,14 +187,14 @@ namespace BlackMisc
//! Uniform way to invoke either a functor or a method.
template <typename T, typename F, typename... Ts>
static auto invoke(T *object, F func, Ts &&... args) -> typename std::enable_if<std::is_member_function_pointer<F>::value>::type
static auto invoke(T *object, F func, Ts &&... args) -> std::enable_if_t<std::is_member_function_pointer<F>::value>
{
return (object->*func)(std::forward<Ts>(args)...);
}
//! Uniform way to invoke either a functor or a method.
template <typename T, typename F, typename... Ts>
static auto invoke(T *, F func, Ts &&... args) -> typename std::enable_if<! std::is_member_function_pointer<F>::value>::type
static auto invoke(T *, F func, Ts &&... args) -> std::enable_if_t<! std::is_member_function_pointer<F>::value>
{
return func(std::forward<Ts>(args)...);
}