Unfortunately it defines basename as a macro, so also change member function name from basename() to get_basename().