Aleksey Gurtovoy wrote:
From http://www.boost.org/libs/mpl/doc/refmanual/protect.html:
'protect' is an identity wrapper for a Metafunction Class that prevents its argument from being recognized as a bind expression.
Actually, the above definition is incomplete; should be:
'protect' is an identity wrapper for a Metafunction Class that prevents its argument from being recognized as a bind/placeholder expression.
The main usage for 'protect' is to prevent parametrized metafunction classes from being accidentally treated as a placeholder expression simply because their arguments happened to embed a placeholder.
Hum. Seems a bit counterintuitive that protect doesn't apply equally well to this case. -- Dave Abrahams Boost Consulting http://www.boost-consulting.com