[gtkmm] implicit convertsion to std::string from Glib::ustring



I browsed the archives and only noticed discussions about the other
direction. I'm wondering if there has been a decision to not allow:

std::string = Glib::ustring("string");

by including something like

// conversion operator to std::string
Glib::ustring::operator std::string () {
  return std::string(c_str());
}

Would this wreak havoc with unintended conversions?

Cheers,

Eric




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]