namespace coost {
namespace detail {

    namespace stdlink {
        // Taken from:
        // http://talesofcpp.fusionfenix.com/post-11/true-story-call-me-maybe
        //
        template <typename T, typename OK = always_same_t<> >
        struct is_callable_helper : std::false_type {
        };

        template <typename Fn, typename ...Args>
        struct is_callable_helper<Fn(Args...),
                                  always_same_t<typename std::result_of<Fn(Args...)>::type> >
            : std::true_type {
        };

        template <typename T>
        struct is_callable : is_callable_helper<T> {
        };

    } // namespace stdlink //

} // namespace detail //
} // namespace coost //

#endif // COOST_LINK_STDHELPERS_IS_CALLABLE_HPP //