add c++ guards