exemple:comment obtenir le type de variable?
template<typename T>
struct type_of {
typedef boost::mpl::if_<boost::is_pointer<T>,
typename boost::remove_pointer<T>::type,
T
>::type type;
};
int main() {
int* ip;
type_of<ip>::type iv = 3; // error: 'ip' cannot appear in a constant-expression
}
Merci!
Fous à tous! J'ai écrit test: http://liveworkspace.org/code/1925198987ec402e5f6ca589d7d4944d – niXman