some magic on C++