namespace detail { \
using ::alps::numeric:: OP_NAME ; \
template<typename T, typename U> struct has_operator_ ## OP_TOKEN ## _impl { \
template<typename R> static char helper(R); \
template<typename C, typename D> static char check(std::integral_constant<std::size_t, sizeof(helper(C() OP D()))>*); \
template<typename C, typename D> static double check(...); \
typedef std::integral_constant<bool, sizeof(char) == sizeof(check<T, U>(0))> type; \
}; \
} \
template<typename T, typename U> struct has_operator_ ## OP_TOKEN : public detail::has_operator_ ## OP_TOKEN ## _impl<T, U> {};