expr
, cooperating with Boost.Typeof,
enables you to extract a type of expression without resulf_of
.
<boost/egg/expr.hpp>
Valid expression |
Semantics |
---|---|
|
|
boost::use_default
, types in Sig
are registered to Boost.Typeof.
Note | |
---|---|
|
void egg_example() { BOOST_AUTO(f, egg::expr<int(int, int)>(unfuse(fuse(bll::_1 + bll::_2))) ); BOOST_CHECK( f(1,2) == 1+2 ); }
Egg provides FC++ infix operator syntax.
<boost/egg/infix.hpp>
Valid expression |
Semantics |
---|---|
|
|
using namespace
infix;
is placed before the valid expression.
operator^
is not overloaded with __typeof
(a1)
.
^__pfo
^
behaves as if it had left to right associativity.
void egg_example() { using namespace infix; std::plus<int> plus; BOOST_CHECK( (1 ^plus^ 2) == 3 ); }
This header lets a Boost.Lambda Function Object be a Polymorphic Function Object.
<boost/egg/bll/result_of.hpp>
Valid expression |
Semantics |
---|---|
|
A Boost.Lambda Function Object becomes a Polymorphic Function Object. |