Re: Gtk::GLArea and related demo - ongoing issue



On Mon, 2015-07-20 at 13:43 +0100, Daniel Hams wrote:
[snip]
Glib::RefPtr<Glib::Error> GLArea::get_error() const;
[snip]

We now have std::shared_ptr in C++11.

However, maybe people would prefer throw_if_error() with try/catch
instead of lots of this:

if(auto derived = std::dynamic_pointer_cast<DerivedException>(error))
{
  ...
}
else if(auto other_derived =
std::dynamic_pointer_cast<OtherDerivedException>(error)
{
  ...
}
else
{
  ... //default
}


-- 
Murray Cumming
murrayc murrayc com
www.murrayc.com




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