If you're using C++11 you don't need rtti at all, you can use std::is_const example :
int x1 = 0;
const int x2 = 0;
bool is_x1_const = std::is_const<decltype(x1)>::value;
bool is_x2_const = std::is_const<decltype(x2)>::value;
Old C++ version :
template<typename T> bool is_const(T) { return false;}
template<typename T> bool is_const(const T) { return true;}