std::auto_ptr deprecation warning in libstdc++ 5.1
- From: Andrew Potter <agpotter gmail com>
- To: "gtkmm-list gnome org" <gtkmm-list gnome org>
- Subject: std::auto_ptr deprecation warning in libstdc++ 5.1
- Date: Sun, 3 May 2015 15:00:19 -0700
Hi everybody,
As you probably know, std::auto_ptr got deprecated in the C++11
standard and is scheduled for removal in C++17. After upgrading to
Fedora 22, I see that g++ is now issuing a warning when it sees use of
std::auto_ptr. Unfortunately there is one in glibmm's objectbase.h:
In file included from /usr/include/glibmm-2.4/glibmm/object.h:29:0,
from /usr/include/giomm-2.4/giomm/simpleaction.h:27,
from application.cpp:19:
/usr/include/glibmm-2.4/glibmm/objectbase.h:215:13: warning:
‘template<class> class std::auto_ptr’ is deprecated
[-Wdeprecated-declarations]
static std::auto_ptr<Threads::Mutex> extra_object_base_data_mutex;
^
In file included from /usr/include/c++/5.1.1/memory:81:0,
from /usr/include/glibmm-2.4/glibmm/objectbase.h:32,
from /usr/include/glibmm-2.4/glibmm/object.h:29,
from /usr/include/giomm-2.4/giomm/simpleaction.h:27,
from application.cpp:19:
/usr/include/c++/5.1.1/bits/unique_ptr.h:49:28: note: declared here
template<typename> class auto_ptr;
^
I don't think this is fully resolvable until the next ABI/API break
(which maybe we should think about in the 2017 timeframe?), but in the
meantime, does anyone have a clever idea to hide this particular
warning without disabling -Wdepreciated-declarations altogether? Or
maybe we can make some ABI-compatible Glib::auto_ptr ?
[Date Prev][
Date Next] [Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]