Description

The proto::as_expr() function turns objects into Proto terminals if they
are not Proto expression types already. Non-Proto types are held by value, if possible. Types which are
already Proto types are left alone.

This function can be called either with an explicitly specified
Domain parameter
(i.e., proto::as_expr<Domain>(t)), or without
(i.e., proto::as_expr(t)). If no domain is specified,
proto::default_domain is assumed.

If proto::is_expr<T>::value is
true, then the argument is returned unmodified. Otherwise,
the argument is wrapped in a Proto terminal expression node according to the following rules.
If T is a function type, let
A be T &. Otherwise, let
A be the type T stripped of
cv-qualifiers. Then, proto::as_expr() returns
Domain()(proto::terminal<A>::type::make(t)).