Flip the order of X and Y in MACRO(X)(Y)
If it is tolerable to omit an open paren, you can achieve it like this:
#define UNWRAP(...) __VA_ARGS__
#define RETURNS(...) \
WHEN ((__VA_ARGS__),
#define WHEN(x, ...) \
enable_if_t<EAT_ ## __VA_ARGS__, UNWRAP x>
#define EAT_requires
template<class T>
auto some_function(T t) ->
RETURNS(pair<int, int>)
requires SomeConcept<T, int>)
Input:
template<class T>
auto some_function(T t) ->
RETURNS(pair<int, int>)
requires SomeConcept<T, int>)
Output:
template<class T>
auto some_function(T t) ->
enable_if_t< SomeConcept<T, int>, pair<int, int> >
Why don't you just use something like
template<class T,bool B>
using reverse_enable_if_t=enable_if_t<B,T>;