Boost logo

Boost :

Subject: [boost] [mpl] Determining when a type is a placeholder expression
From: Edward Diener (eldiener_at_[hidden])
Date: 2012-11-29 23:18:07

Is there any way to determine when a type is an MPL placeholder
expression ?

I can determine whether a type is a metafunction class ( it has a class
template called 'apply' ), but I can't think of any sure way to
determine whether or not a type is a placeholder expression.

Ideally if a type in one of my templates is an MPL lambda expression (
its either a metafunction class or placeholder expression ) I want to
invoke it with some compile-time data, otherwise I want to do something
else with that type.

Of course a less elegant solution is to have another template
boost::mpl::bool_ parameter telling which it is but I was hoping to
avoid it if I can figure it out myself.

Boost list run by bdawes at, gregod at, cpdaniel at, john at