...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
boost::proto::exact — For forcing exact matches of terminal types.
// In header: <boost/proto/matches.hpp> template<typename T> struct exact { };
By default, matching terminals ignores references and cv-qualifiers. For instance,
a terminal expression of type
proto::terminal<int const &>::type
will match the grammar proto::terminal<int>
.
If that is not desired, you can force an exact match with
proto::terminal<proto::exact<int> >
.
This will only match integer terminals where the terminal is held by value.