Moreover, your result are wrong
result_of will always return void.
You need somethign like:
struct arg_tag
{};
namespace proto = boost::proto;
namespace mpl = boost::mpl;
using namespace std;
template<int N>
struct arg
: proto::or_ >
{};
template<typename T>
struct readonly
: proto::callable {
template<typename Sig>
struct result;
template
struct result
{
typedef const T& type;
};
};
template<typename T>
struct readwrite
: proto::callable {
template<typename Sig>
struct result;
template
struct result
{
typedef T& type;
};
};
template
struct argtype
: proto::or_<
proto::when, readwrite<T>(proto::_)>
, proto::otherwise
{};
proto::nullary_expr >::type const _1 = {{}};
proto::nullary_expr >::type const _2 = {{}};
namespace boost { namespace proto
{
template<class T> struct is_callable : true_ {};
template<class T> struct is_callable : true_ {};
}}