
#include <iostream>
#include <boost/preprocessor.hpp>

struct O
{
	template <class T1, class T2>
	struct A {};
};
template<class T>
struct argument_type;
template<class T, class U>
struct argument_type<T(U)>
{
	using type = U;
};
#define DEF_VAR(TYPE, NAME) argument_type<void(TYPE)>::type NAME
int main()
{
	#define MEM ((O::A<int*, int>))(val)
	#define SEQ (MEM)
	DEF_VAR
	(
		BOOST_PP_SEQ_ELEM(0, BOOST_PP_SEQ_HEAD(SEQ)),
		BOOST_PP_SEQ_ELEM(1, BOOST_PP_SEQ_HEAD(SEQ))
	);
}