#pragma once
#if __cplusplus >= 201103L
namespace __jitify_type_traits_ns {
    template<bool B, class T = void> struct enable_if {};
    template<class T>                struct enable_if<true, T> { typedef T type; };

    struct true_type  { enum { value = true }; };
    struct false_type { enum { value = false }; };
    template<typename T> struct is_floating_point    : false_type {};
    template<> struct is_floating_point<float>       :  true_type {};
    template<> struct is_floating_point<double>      :  true_type {};
    template<> struct is_floating_point<long double> :  true_type {};

    template<typename T, typename U> struct is_same      : false_type {};
    template<typename T>             struct is_same<T,T> :  true_type {};
    template<class>
	struct result_of;
    template<class F, typename... Args>
	struct result_of<F(Args...)> {
	// TODO: This is a hack; a proper implem is quite complicated.
        typedef typename F::result_type type;
    };
} // namespace __jtiify_type_traits_ns
namespace std { using namespace __jitify_type_traits_ns; }
using namespace __jitify_type_traits_ns;
#endif // c++11
