[glibmm] C++11: .h/.cc files: Replace typedefs with using.



commit f61e1d0e8b6c48d940ba9d2690543af9192614c1
Author: Murray Cumming <murrayc murrayc com>
Date:   Thu Mar 31 11:14:58 2016 +0200

    C++11: .h/.cc files: Replace typedefs with using.

 examples/thread/dispatcher2.cc             |    2 +-
 gio/giomm/socketsource.h                   |    2 +-
 glib/glibmm/arrayhandle.h                  |   58 ++++++++--------
 glib/glibmm/class.h                        |    4 +-
 glib/glibmm/containerhandle_shared.h       |   60 +++++++++---------
 glib/glibmm/containers.h                   |   70 ++++++++++----------
 glib/glibmm/error.cc                       |    2 +-
 glib/glibmm/error.h                        |    2 +-
 glib/glibmm/exceptionhandler.cc            |    2 +-
 glib/glibmm/helperlist.h                   |   20 +++---
 glib/glibmm/interface.h                    |    6 +-
 glib/glibmm/listhandle.h                   |   28 ++++----
 glib/glibmm/main.h                         |   18 +++---
 glib/glibmm/object.h                       |   34 +++++-----
 glib/glibmm/objectbase.h                   |    4 +-
 glib/glibmm/pattern.h                      |    2 +-
 glib/glibmm/private/interface_p.h          |    4 +-
 glib/glibmm/private/object_p.h             |    6 +-
 glib/glibmm/property.h                     |    4 +-
 glib/glibmm/propertyproxy.h                |    6 +-
 glib/glibmm/propertyproxy_base.h           |    2 +-
 glib/glibmm/random.h                       |    2 +-
 glib/glibmm/refptr.h                       |    2 +-
 glib/glibmm/sarray.h                       |    2 +-
 glib/glibmm/signalproxy.h                  |    8 +-
 glib/glibmm/signalproxy_connectionnode.h   |    4 +-
 glib/glibmm/slisthandle.h                  |   28 ++++----
 glib/glibmm/threadpool.h                   |    2 +-
 glib/glibmm/timer.h                        |    2 +-
 glib/glibmm/ustring.h                      |   62 +++++++++---------
 glib/glibmm/value.h                        |   26 ++++----
 glib/glibmm/value_custom.h                 |    8 +-
 glib/glibmm/vectorutils.h                  |   96 ++++++++++++++--------------
 glib/glibmm/wrap.cc                        |    2 +-
 glib/glibmm/wrap.h                         |    2 +-
 tests/glibmm_btree/main.cc                 |    4 +-
 tests/glibmm_interface_move/main.cc        |   10 ++--
 tests/glibmm_nodetree/main.cc              |    2 +-
 tests/glibmm_null_containerhandle/main.cc  |    2 +-
 tests/glibmm_null_vectorutils/main.cc      |    2 +-
 tests/glibmm_variant/main.cc               |   14 ++--
 tools/extra_defs_gen/generate_extra_defs.h |    2 +-
 42 files changed, 309 insertions(+), 309 deletions(-)
---
diff --git a/examples/thread/dispatcher2.cc b/examples/thread/dispatcher2.cc
index 2891293..dbe176c 100644
--- a/examples/thread/dispatcher2.cc
+++ b/examples/thread/dispatcher2.cc
@@ -41,7 +41,7 @@ public:
   void signal_finished_emit();
   void print() const;
 
-  typedef sigc::signal<void> type_signal_end;
+  using type_signal_end = sigc::signal<void>;
   static type_signal_end& signal_end();
 
 private:
diff --git a/gio/giomm/socketsource.h b/gio/giomm/socketsource.h
index 2096816..c1345c6 100644
--- a/gio/giomm/socketsource.h
+++ b/gio/giomm/socketsource.h
@@ -100,7 +100,7 @@ SignalSocket signal_socket(
 class SocketSource : public Glib::IOSource
 {
 public:
-  typedef Gio::SocketSource CppObjectType;
+  using CppObjectType = Gio::SocketSource;
 
   static Glib::RefPtr<SocketSource> create(const Glib::RefPtr<Socket>& socket,
     Glib::IOCondition condition,
diff --git a/glib/glibmm/arrayhandle.h b/glib/glibmm/arrayhandle.h
index 19454cb..02ec243 100644
--- a/glib/glibmm/arrayhandle.h
+++ b/glib/glibmm/arrayhandle.h
@@ -51,7 +51,7 @@ template <class For, class Tr>
 typename Tr::CType*
 create_array(For pbegin, std::size_t size, Tr)
 {
-  typedef typename Tr::CType CType;
+  using CType = typename Tr::CType;
 
   CType* const array = static_cast<CType*>(g_malloc((size + 1) * sizeof(CType)));
   CType* const array_end = array + size;
@@ -90,7 +90,7 @@ create_bool_array(For pbegin, std::size_t size)
 template <class Tr, class Cont>
 struct ArraySourceTraits
 {
-  typedef typename Tr::CType CType;
+  using CType = typename Tr::CType;
 
   static std::size_t get_size(const Cont& cont) { return cont.size(); }
 
@@ -106,7 +106,7 @@ struct ArraySourceTraits
 template <class Cont>
 struct BoolArraySourceTraits
 {
-  typedef gboolean CType;
+  using CType = gboolean;
 
   static std::size_t get_size(const Cont& cont) { return cont.size(); }
 
@@ -123,7 +123,7 @@ struct BoolArraySourceTraits
 template <class Tr, class Cont>
 struct ArraySourceTraits<Tr, Cont*>
 {
-  typedef typename Tr::CType CType;
+  using CType = typename Tr::CType;
 
   static std::size_t get_size(const CType* array)
   {
@@ -148,7 +148,7 @@ struct ArraySourceTraits<Tr, const Cont*> : ArraySourceTraits<Tr, Cont*>
 template <class Tr, class Cont, std::size_t N>
 struct ArraySourceTraits<Tr, Cont[N]>
 {
-  typedef typename Tr::CType CType;
+  using CType = typename Tr::CType;
 
   static std::size_t get_size(const CType*) { return (N - 1); }
 
@@ -171,14 +171,14 @@ template <class Tr>
 class ArrayHandleIterator
 {
 public:
-  typedef typename Tr::CppType CppType;
-  typedef typename Tr::CType CType;
+  using CppType = typename Tr::CppType;
+  using CType = typename Tr::CType;
 
-  typedef std::random_access_iterator_tag iterator_category;
-  typedef CppType value_type;
-  typedef std::ptrdiff_t difference_type;
-  typedef value_type reference;
-  typedef void pointer;
+  using iterator_category = std::random_access_iterator_tag;
+  using value_type = CppType;
+  using difference_type = std::ptrdiff_t;
+  using reference = value_type;
+  using pointer = void;
 
   explicit inline ArrayHandleIterator(const CType* pos);
 
@@ -231,15 +231,15 @@ template <class T, class Tr = Glib::Container_Helpers::TypeTraits<T>>
 class ArrayHandle
 {
 public:
-  typedef typename Tr::CppType CppType;
-  typedef typename Tr::CType CType;
+  using CppType = typename Tr::CppType;
+  using CType = typename Tr::CType;
 
-  typedef CppType value_type;
-  typedef std::size_t size_type;
-  typedef std::ptrdiff_t difference_type;
+  using value_type = CppType;
+  using size_type = std::size_t;
+  using difference_type = std::ptrdiff_t;
 
-  typedef Glib::Container_Helpers::ArrayHandleIterator<Tr> const_iterator;
-  typedef Glib::Container_Helpers::ArrayHandleIterator<Tr> iterator;
+  using const_iterator = Glib::Container_Helpers::ArrayHandleIterator<Tr>;
+  using iterator = Glib::Container_Helpers::ArrayHandleIterator<Tr>;
 
   template <class Cont>
   inline ArrayHandle(const Cont& container);
@@ -286,18 +286,18 @@ template <>
 class ArrayHandle<bool, Container_Helpers::TypeTraits<bool>>
 {
 public:
-  typedef ArrayHandle<bool, Container_Helpers::TypeTraits<bool>> Me;
-  typedef Container_Helpers::TypeTraits<bool> Tr;
+  using Me = ArrayHandle<bool, Container_Helpers::TypeTraits<bool>>;
+  using Tr = Container_Helpers::TypeTraits<bool>;
 
-  typedef Tr::CppType CppType;
-  typedef Tr::CType CType;
+  using CppType = Tr::CppType;
+  using CType = Tr::CType;
 
-  typedef CppType value_type;
-  typedef std::size_t size_type;
-  typedef std::ptrdiff_t difference_type;
+  using value_type = CppType;
+  using size_type = std::size_t;
+  using difference_type = std::ptrdiff_t;
 
-  typedef Glib::Container_Helpers::ArrayHandleIterator<Tr> const_iterator;
-  typedef Glib::Container_Helpers::ArrayHandleIterator<Tr> iterator;
+  using const_iterator = Glib::Container_Helpers::ArrayHandleIterator<Tr>;
+  using iterator = Glib::Container_Helpers::ArrayHandleIterator<Tr>;
 
   template <class Cont>
   inline ArrayHandle(const Cont& container);
@@ -383,7 +383,7 @@ private:
  *
  * @ingroup ContHandles
  */
-typedef ArrayHandle<Glib::ustring> StringArrayHandle;
+using StringArrayHandle = ArrayHandle<Glib::ustring>;
 
 /***************************************************************************/
 /*  Inline implementation                                                  */
diff --git a/glib/glibmm/class.h b/glib/glibmm/class.h
index 691c1bf..bc5a06a 100644
--- a/glib/glibmm/class.h
+++ b/glib/glibmm/class.h
@@ -67,7 +67,7 @@ public:
   GType clone_custom_type(const char* custom_type_name) const;
 
   /// The type that holds pointers to the interfaces of custom types.
-  typedef std::vector<const Interface_Class*> interface_class_vector_type;
+  using interface_class_vector_type = std::vector<const Interface_Class*>;
 
   /** Register a static custom GType, derived from the parent of this class's type.
    * The parent type of the registered custom type is the same C class as the parent
@@ -103,7 +103,7 @@ private:
 public:
 #ifndef DOXYGEN_SHOULD_SKIP_THIS
   // The type that holds the values of the interface properties of custom types.
-  typedef std::vector<GValue*> iface_properties_type;
+  using iface_properties_type = std::vector<GValue*>;
   // The quark used for storing/getting the interface properties of custom types.
   static GQuark iface_properties_quark;
 #endif
diff --git a/glib/glibmm/containerhandle_shared.h b/glib/glibmm/containerhandle_shared.h
index 7084e9b..dffce99 100644
--- a/glib/glibmm/containerhandle_shared.h
+++ b/glib/glibmm/containerhandle_shared.h
@@ -107,9 +107,9 @@ namespace Container_Helpers
 template <class T>
 struct TypeTraits
 {
-  typedef T CppType;
-  typedef T CType;
-  typedef T CTypeNonConst;
+  using CppType = T;
+  using CType = T;
+  using CTypeNonConst = T;
 
   static CType to_c_type(const CppType& item) { return item; }
   static CppType to_cpp_type(const CType& item) { return item; }
@@ -128,9 +128,9 @@ struct TypeTraits
 template <class T>
 struct TypeTraits<T*>
 {
-  typedef T* CppType;
-  typedef typename T::BaseObjectType* CType;
-  typedef typename T::BaseObjectType* CTypeNonConst;
+  using CppType = T*;
+  using CType = typename T::BaseObjectType*;
+  using CTypeNonConst = typename T::BaseObjectType*;
 
   static CType to_c_type(CppType ptr) { return Glib::unwrap(ptr); }
   static CType to_c_type(CType ptr) { return ptr; }
@@ -160,9 +160,9 @@ struct TypeTraits<T*>
 template <class T>
 struct TypeTraits<const T*>
 {
-  typedef const T* CppType;
-  typedef const typename T::BaseObjectType* CType;
-  typedef typename T::BaseObjectType* CTypeNonConst;
+  using CppType = const T*;
+  using CType = const typename T::BaseObjectType*;
+  using CTypeNonConst = typename T::BaseObjectType*;
 
   static CType to_c_type(CppType ptr) { return Glib::unwrap(ptr); }
   static CType to_c_type(CType ptr) { return ptr; }
@@ -191,9 +191,9 @@ struct TypeTraits<const T*>
 template <class T>
 struct TypeTraits<Glib::RefPtr<T>>
 {
-  typedef Glib::RefPtr<T> CppType;
-  typedef typename T::BaseObjectType* CType;
-  typedef typename T::BaseObjectType* CTypeNonConst;
+  using CppType = Glib::RefPtr<T>;
+  using CType = typename T::BaseObjectType*;
+  using CTypeNonConst = typename T::BaseObjectType*;
 
   static CType to_c_type(const CppType& ptr) { return Glib::unwrap(ptr); }
   static CType to_c_type(CType ptr) { return ptr; }
@@ -227,9 +227,9 @@ struct TypeTraits<Glib::RefPtr<T>>
 template <class T>
 struct TypeTraits<Glib::RefPtr<const T>>
 {
-  typedef Glib::RefPtr<const T> CppType;
-  typedef const typename T::BaseObjectType* CType;
-  typedef typename T::BaseObjectType* CTypeNonConst;
+  using CppType = Glib::RefPtr<const T>;
+  using CType = const typename T::BaseObjectType*;
+  using CTypeNonConst = typename T::BaseObjectType*;
 
   static CType to_c_type(const CppType& ptr) { return Glib::unwrap(ptr); }
   static CType to_c_type(CType ptr) { return ptr; }
@@ -267,9 +267,9 @@ struct TypeTraits<Glib::RefPtr<const T>>
 template <>
 struct TypeTraits<Glib::ustring>
 {
-  typedef Glib::ustring CppType;
-  typedef const char* CType;
-  typedef char* CTypeNonConst;
+  using CppType = Glib::ustring;
+  using CType = const char*;
+  using CTypeNonConst = char*;
 
   static CType to_c_type(const Glib::ustring& str) { return str.c_str(); }
   static CType to_c_type(const std::string& str) { return str.c_str(); }
@@ -289,9 +289,9 @@ struct TypeTraits<Glib::ustring>
 template <>
 struct TypeTraits<std::string>
 {
-  typedef std::string CppType;
-  typedef const char* CType;
-  typedef char* CTypeNonConst;
+  using CppType = std::string;
+  using CType = const char*;
+  using CTypeNonConst = char*;
 
   static CType to_c_type(const std::string& str) { return str.c_str(); }
   static CType to_c_type(const Glib::ustring& str) { return str.c_str(); }
@@ -308,9 +308,9 @@ struct TypeTraits<std::string>
 template <>
 struct TypeTraits<bool>
 {
-  typedef bool CppType;
-  typedef gboolean CType;
-  typedef gboolean CTypeNonConst;
+  using CppType = bool;
+  using CType = gboolean;
+  using CTypeNonConst = gboolean;
 
   static CType to_c_type(CppType item) { return static_cast<CType>(item); }
   static CType to_c_type(CType item) { return item; }
@@ -324,9 +324,9 @@ struct TypeTraits<bool>
 template <>
 struct TypeTraits<Glib::VariantBase>
 {
-  typedef Glib::VariantBase CppType;
-  typedef GVariant* CType;
-  typedef GVariant* CTypeNonConst;
+  using CppType = Glib::VariantBase;
+  using CType = GVariant*;
+  using CTypeNonConst = GVariant*;
 
   static CType to_c_type(const Glib::VariantBase& v) { return const_cast<CTypeNonConst>(v.gobj()); }
 
@@ -343,9 +343,9 @@ struct TypeTraits<Glib::VariantBase>
 template <>
 struct TypeTraits<Glib::VariantContainerBase>
 {
-  typedef Glib::VariantContainerBase CppType;
-  typedef GVariant* CType;
-  typedef GVariant* CTypeNonConst;
+  using CppType = Glib::VariantContainerBase;
+  using CType = GVariant*;
+  using CTypeNonConst = GVariant*;
 
   static CType to_c_type(const Glib::VariantContainerBase& v)
   {
diff --git a/glib/glibmm/containers.h b/glib/glibmm/containers.h
index 46b87d0..2382b3c 100644
--- a/glib/glibmm/containers.h
+++ b/glib/glibmm/containers.h
@@ -50,9 +50,9 @@ template <class T>
 class List_Iterator_Base
 {
 public:
-  typedef T value_type;
-  typedef T* pointer;
-  typedef T& reference;
+  using value_type = T;
+  using pointer = T*;
+  using reference = T&;
 };
 
 /// For instance, List_Iterator< Gtk::Widget >
@@ -60,17 +60,17 @@ template <class T>
 class List_Iterator : public List_Iterator_Base<T>
 {
 public:
-  typedef std::bidirectional_iterator_tag iterator_category;
-  typedef std::size_t size_type;
-  typedef std::ptrdiff_t difference_type;
+  using iterator_category = std::bidirectional_iterator_tag;
+  using size_type = std::size_t;
+  using difference_type = std::ptrdiff_t;
 
-  typedef typename List_Iterator_Base<T>::pointer pointer;
-  typedef typename List_Iterator_Base<T>::reference reference;
+  using pointer = typename List_Iterator_Base<T>::pointer;
+  using reference = typename List_Iterator_Base<T>::reference;
 
   GList* const* head_;
   GList* node_;
 
-  typedef List_Iterator<T> Self;
+  using Self = List_Iterator<T>;
 
   List_Iterator(GList* const& head, GList* node) : head_(&head), node_(node) {}
 
@@ -124,15 +124,15 @@ template <class T>
 class SList_Iterator : public List_Iterator_Base<T>
 {
 public:
-  typedef std::forward_iterator_tag iterator_category;
-  typedef std::size_t size_type;
-  typedef std::ptrdiff_t difference_type;
+  using iterator_category = std::forward_iterator_tag;
+  using size_type = std::size_t;
+  using difference_type = std::ptrdiff_t;
 
-  typedef typename List_Iterator_Base<T>::pointer pointer;
-  typedef typename List_Iterator_Base<T>::reference reference;
+  using pointer = typename List_Iterator_Base<T>::pointer;
+  using reference = typename List_Iterator_Base<T>::reference;
 
   GSList* node_;
-  typedef SList_Iterator<T> Self;
+  using Self = SList_Iterator<T>;
 
   SList_Iterator(GSList* node) : node_(node) {}
 
@@ -171,14 +171,14 @@ template <class T_Impl, class T_IFace>
 class List_Cpp_Iterator : public List_Iterator_Base<T_IFace>
 {
 public:
-  typedef std::bidirectional_iterator_tag iterator_category;
-  typedef std::size_t size_type;
-  typedef std::ptrdiff_t difference_type;
+  using iterator_category = std::bidirectional_iterator_tag;
+  using size_type = std::size_t;
+  using difference_type = std::ptrdiff_t;
 
-  typedef typename List_Iterator_Base<T_IFace>::pointer pointer;
-  typedef typename List_Iterator_Base<T_IFace>::reference reference;
+  using pointer = typename List_Iterator_Base<T_IFace>::pointer;
+  using reference = typename List_Iterator_Base<T_IFace>::reference;
 
-  typedef List_Cpp_Iterator<T_Impl, T_IFace> Self;
+  using Self = List_Cpp_Iterator<T_Impl, T_IFace>;
 
   GList** head_;
   GList* node_;
@@ -254,15 +254,15 @@ template <class T_Base>
 class List_ReverseIterator : private T_Base
 {
 public:
-  typedef typename T_Base::iterator_category iterator_category;
-  typedef typename T_Base::size_type size_type;
-  typedef typename T_Base::difference_type difference_type;
+  using iterator_category = typename T_Base::iterator_category;
+  using size_type = typename T_Base::size_type;
+  using difference_type = typename T_Base::difference_type;
 
-  typedef typename T_Base::value_type value_type;
-  typedef typename T_Base::pointer pointer;
-  typedef typename T_Base::reference reference;
+  using value_type = typename T_Base::value_type;
+  using pointer = typename T_Base::pointer;
+  using reference = typename T_Base::reference;
 
-  typedef List_ReverseIterator<T_Base> Self;
+  using Self = List_ReverseIterator<T_Base>;
 
   bool operator==(const Self& src) const { return T_Base::operator==(src); }
   bool operator!=(const Self& src) const { return T_Base::operator!=(src); }
@@ -306,15 +306,15 @@ template <class T_Base>
 class List_ConstIterator : public T_Base
 {
 public:
-  typedef typename T_Base::iterator_category iterator_category;
-  typedef typename T_Base::size_type size_type;
-  typedef typename T_Base::difference_type difference_type;
+  using iterator_category = typename T_Base::iterator_category;
+  using size_type = typename T_Base::size_type;
+  using difference_type = typename T_Base::difference_type;
 
-  typedef const typename T_Base::value_type value_type;
-  typedef const typename T_Base::pointer pointer;
-  typedef const typename T_Base::reference reference;
+  using value_type = const typename T_Base::value_type;
+  using pointer = const typename T_Base::pointer;
+  using reference = const typename T_Base::reference;
 
-  typedef List_ConstIterator<T_Base> Self;
+  using Self = List_ConstIterator<T_Base>;
 
   bool operator==(const Self& src) const { return T_Base::operator==(src); }
   bool operator!=(const Self& src) const { return T_Base::operator!=(src); }
diff --git a/glib/glibmm/error.cc b/glib/glibmm/error.cc
index 34ea87a..0906336 100644
--- a/glib/glibmm/error.cc
+++ b/glib/glibmm/error.cc
@@ -27,7 +27,7 @@
 namespace
 {
 
-typedef std::map<GQuark, Glib::Error::ThrowFunc> ThrowFuncTable;
+using ThrowFuncTable = std::map<GQuark, Glib::Error::ThrowFunc>;
 
 static ThrowFuncTable* throw_func_table = nullptr;
 
diff --git a/glib/glibmm/error.h b/glib/glibmm/error.h
index 941dc9d..eb61b4e 100644
--- a/glib/glibmm/error.h
+++ b/glib/glibmm/error.h
@@ -51,7 +51,7 @@ public:
 
   void propagate(GError** dest);
 
-  typedef void (*ThrowFunc)(GError*);
+  using ThrowFunc = void(*)(GError*);
 
   static void register_init();
   static void register_cleanup();
diff --git a/glib/glibmm/exceptionhandler.cc b/glib/glibmm/exceptionhandler.cc
index 60809db..31ddb39 100644
--- a/glib/glibmm/exceptionhandler.cc
+++ b/glib/glibmm/exceptionhandler.cc
@@ -32,7 +32,7 @@
 namespace
 {
 
-typedef sigc::signal<void> HandlerList;
+using HandlerList = sigc::signal<void>;
 
 // Each thread has its own list of exception handlers
 // to avoid thread synchronization problems.
diff --git a/glib/glibmm/helperlist.h b/glib/glibmm/helperlist.h
index 41f1074..ac0c2a5 100644
--- a/glib/glibmm/helperlist.h
+++ b/glib/glibmm/helperlist.h
@@ -51,19 +51,19 @@ public:
 
   virtual ~HelperList() noexcept {}
 
-  typedef T_Child value_type;
-  typedef value_type& reference;
-  typedef const value_type& const_reference;
+  using value_type = T_Child;
+  using reference = value_type&;
+  using const_reference = const value_type&;
 
-  typedef T_Iterator iterator;
-  typedef List_ConstIterator<iterator> const_iterator;
-  typedef List_ReverseIterator<iterator> reverse_iterator;
-  typedef List_ConstIterator<reverse_iterator> const_reverse_iterator;
+  using iterator = T_Iterator;
+  using const_iterator = List_ConstIterator<iterator>;
+  using reverse_iterator = List_ReverseIterator<iterator>;
+  using const_reverse_iterator = List_ConstIterator<reverse_iterator>;
 
-  typedef T_CppElement element_type;
+  using element_type = T_CppElement;
 
-  typedef std::size_t difference_type; // TODO Why not std::ptrdiff_t?
-  typedef std::size_t size_type;
+  using difference_type = std::size_t; // TODO Why not std::ptrdiff_t?
+  using size_type = std::size_t;
 
   // These are implemented differently for each Helper List.
   virtual iterator erase(iterator) = 0;
diff --git a/glib/glibmm/interface.h b/glib/glibmm/interface.h
index c737639..0b27914 100644
--- a/glib/glibmm/interface.h
+++ b/glib/glibmm/interface.h
@@ -35,9 +35,9 @@ class GLIBMM_API Interface : virtual public Glib::ObjectBase
 {
 public:
 #ifndef DOXYGEN_SHOULD_SKIP_THIS
-  typedef Interface CppObjectType;
-  typedef Interface_Class CppClassType;
-  typedef GTypeInterface BaseClassType;
+  using CppObjectType = Interface;
+  using CppClassType = Interface_Class;
+  using BaseClassType = GTypeInterface;
 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
 
   /** A Default constructor.
diff --git a/glib/glibmm/listhandle.h b/glib/glibmm/listhandle.h
index 92f9bec..985f978 100644
--- a/glib/glibmm/listhandle.h
+++ b/glib/glibmm/listhandle.h
@@ -131,14 +131,14 @@ template <class Tr>
 class ListHandleIterator
 {
 public:
-  typedef typename Tr::CppType CppType;
-  typedef typename Tr::CType CType;
+  using CppType = typename Tr::CppType;
+  using CType = typename Tr::CType;
 
-  typedef std::forward_iterator_tag iterator_category;
-  typedef CppType value_type;
-  typedef std::ptrdiff_t difference_type;
-  typedef value_type reference;
-  typedef void pointer;
+  using iterator_category = std::forward_iterator_tag;
+  using value_type = CppType;
+  using difference_type = std::ptrdiff_t;
+  using reference = value_type;
+  using pointer = void;
 
   explicit inline ListHandleIterator(const GList* node);
 
@@ -169,15 +169,15 @@ template <class T, class Tr = Glib::Container_Helpers::TypeTraits<T>>
 class ListHandle
 {
 public:
-  typedef typename Tr::CppType CppType;
-  typedef typename Tr::CType CType;
+  using CppType = typename Tr::CppType;
+  using CType = typename Tr::CType;
 
-  typedef CppType value_type;
-  typedef std::size_t size_type;
-  typedef std::ptrdiff_t difference_type;
+  using value_type = CppType;
+  using size_type = std::size_t;
+  using difference_type = std::ptrdiff_t;
 
-  typedef Glib::Container_Helpers::ListHandleIterator<Tr> const_iterator;
-  typedef Glib::Container_Helpers::ListHandleIterator<Tr> iterator;
+  using const_iterator = Glib::Container_Helpers::ListHandleIterator<Tr>;
+  using iterator = Glib::Container_Helpers::ListHandleIterator<Tr>;
 
   template <class Cont>
   inline ListHandle(const Cont& container);
diff --git a/glib/glibmm/main.h b/glib/glibmm/main.h
index 5bfacbe..f60cc8f 100644
--- a/glib/glibmm/main.h
+++ b/glib/glibmm/main.h
@@ -400,8 +400,8 @@ SignalChildWatch signal_child_watch();
 class MainContext
 {
 public:
-  typedef Glib::MainContext CppObjectType;
-  typedef GMainContext BaseObjectType;
+  using CppObjectType = Glib::MainContext;
+  using BaseObjectType = GMainContext;
 
   // noncopyable
   MainContext(const MainContext& other) = delete;
@@ -624,8 +624,8 @@ Glib::RefPtr<MainContext> wrap(GMainContext* gobject, bool take_copy = false);
 class MainLoop
 {
 public:
-  typedef Glib::MainLoop CppObjectType;
-  typedef GMainLoop BaseObjectType;
+  using CppObjectType = Glib::MainLoop;
+  using BaseObjectType = GMainLoop;
 
   static Glib::RefPtr<MainLoop> create(bool is_running = false);
   static Glib::RefPtr<MainLoop> create(
@@ -682,8 +682,8 @@ Glib::RefPtr<MainLoop> wrap(GMainLoop* gobject, bool take_copy = false);
 class Source
 {
 public:
-  typedef Glib::Source CppObjectType;
-  typedef GSource BaseObjectType;
+  using CppObjectType = Glib::Source;
+  using BaseObjectType = GSource;
 
   // noncopyable
   Source(const Source&) = delete;
@@ -845,7 +845,7 @@ public:
 class TimeoutSource : public Glib::Source
 {
 public:
-  typedef Glib::TimeoutSource CppObjectType;
+  using CppObjectType = Glib::TimeoutSource;
 
   static Glib::RefPtr<TimeoutSource> create(unsigned int interval);
   sigc::connection connect(const sigc::slot<bool>& slot);
@@ -868,7 +868,7 @@ private:
 class IdleSource : public Glib::Source
 {
 public:
-  typedef Glib::IdleSource CppObjectType;
+  using CppObjectType = Glib::IdleSource;
 
   static Glib::RefPtr<IdleSource> create();
   sigc::connection connect(const sigc::slot<bool>& slot);
@@ -885,7 +885,7 @@ protected:
 class IOSource : public Glib::Source
 {
 public:
-  typedef Glib::IOSource CppObjectType;
+  using CppObjectType = Glib::IOSource;
 
   static Glib::RefPtr<IOSource> create(int fd, IOCondition condition);
   static Glib::RefPtr<IOSource> create(
diff --git a/glib/glibmm/object.h b/glib/glibmm/object.h
index 522f84a..3ff39b0 100644
--- a/glib/glibmm/object.h
+++ b/glib/glibmm/object.h
@@ -38,8 +38,8 @@
 
 #ifndef DOXYGEN_SHOULD_SKIP_THIS
 extern "C" {
-typedef struct _GObject GObject;
-typedef struct _GObjectClass GObjectClass;
+using GObject = struct _GObject;
+using GObjectClass = struct _GObjectClass;
 }
 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
 
@@ -95,10 +95,10 @@ class GLIBMM_API Object : virtual public ObjectBase
 {
 public:
 #ifndef DOXYGEN_SHOULD_SKIP_THIS
-  typedef Object CppObjectType;
-  typedef Object_Class CppClassType;
-  typedef GObject BaseObjectType;
-  typedef GObjectClass BaseClassType;
+  using CppObjectType = Object;
+  using CppClassType = Object_Class;
+  using BaseObjectType = GObject;
+  using BaseClassType = GObjectClass;
 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
 
   // noncopyable
@@ -129,7 +129,7 @@ public:
   // TODO: Use slots instead:
   void* get_data(const QueryQuark& key);
   void set_data(const Quark& key, void* data);
-  typedef void (*DestroyNotify)(gpointer data);
+  using DestroyNotify = void (*)(gpointer data);
   void set_data(const Quark& key, void* data, DestroyNotify notify);
   void remove_data(const QueryQuark& quark);
   // same as remove without notifying
@@ -171,9 +171,9 @@ namespace Container_Helpers
 template <class T>
 struct TypeTraits<Glib::RefPtr<T>>
 {
-  typedef Glib::RefPtr<T> CppType;
-  typedef typename T::BaseObjectType* CType;
-  typedef typename T::BaseObjectType* CTypeNonConst;
+  using CppType = Glib::RefPtr<T>;
+  using CType = typename T::BaseObjectType*;
+  using CTypeNonConst = typename T::BaseObjectType*;
 
   static CType to_c_type(const CppType& ptr) { return Glib::unwrap(ptr); }
   static CType to_c_type(CType ptr) { return ptr; }
@@ -207,9 +207,9 @@ struct TypeTraits<Glib::RefPtr<T>>
 template <class T>
 struct TypeTraits<Glib::RefPtr<const T>>
 {
-  typedef Glib::RefPtr<const T> CppType;
-  typedef const typename T::BaseObjectType* CType;
-  typedef typename T::BaseObjectType* CTypeNonConst;
+  using CppType = Glib::RefPtr<const T>;
+  using CType = const typename T::BaseObjectType*;
+  using CTypeNonConst = typename T::BaseObjectType*;
 
   static CType to_c_type(const CppType& ptr) { return Glib::unwrap(ptr); }
   static CType to_c_type(CType ptr) { return ptr; }
@@ -252,8 +252,8 @@ template <class T>
 class Value<Glib::RefPtr<T>> : public ValueBase_Object
 {
 public:
-  typedef Glib::RefPtr<T> CppType;
-  typedef typename T::BaseObjectType* CType;
+  using CppType = Glib::RefPtr<T>;
+  using CType = typename T::BaseObjectType*;
 
   static GType value_type() { return T::get_base_type(); }
 
@@ -271,8 +271,8 @@ template <class T>
 class Value<Glib::RefPtr<const T>> : public ValueBase_Object
 {
 public:
-  typedef Glib::RefPtr<const T> CppType;
-  typedef typename T::BaseObjectType* CType;
+  using CppType = Glib::RefPtr<const T>;
+  using CType = typename T::BaseObjectType*;
 
   static GType value_type() { return T::get_base_type(); }
 
diff --git a/glib/glibmm/objectbase.h b/glib/glibmm/objectbase.h
index 7d34bea..cf6a4a0 100644
--- a/glib/glibmm/objectbase.h
+++ b/glib/glibmm/objectbase.h
@@ -34,7 +34,7 @@
 
 #ifndef DOXYGEN_SHOULD_SKIP_THIS
 extern "C" {
-typedef struct _GObject GObject;
+using GObject = struct _GObject;
 }
 #endif
 
@@ -229,7 +229,7 @@ protected:
     Class::interface_class_vector_type custom_interface_classes;
   };
 
-  typedef std::map<const ObjectBase*, ExtraObjectBaseData> extra_object_base_data_type;
+  using extra_object_base_data_type = std::map<const ObjectBase*, ExtraObjectBaseData>;
   static extra_object_base_data_type extra_object_base_data;
   // ObjectBase instances may be used in different threads.
   // Accesses to extra_object_base_data must be thread-safe.
diff --git a/glib/glibmm/pattern.h b/glib/glibmm/pattern.h
index d588f08..fddec5c 100644
--- a/glib/glibmm/pattern.h
+++ b/glib/glibmm/pattern.h
@@ -24,7 +24,7 @@
  */
 
 extern "C" {
-typedef struct _GPatternSpec GPatternSpec;
+using GPatternSpec = struct _GPatternSpec;
 }
 
 #include <glibmm/ustring.h>
diff --git a/glib/glibmm/private/interface_p.h b/glib/glibmm/private/interface_p.h
index 3596315..a116e0e 100644
--- a/glib/glibmm/private/interface_p.h
+++ b/glib/glibmm/private/interface_p.h
@@ -11,8 +11,8 @@ namespace Glib
 class Interface_Class : public Glib::Class
 {
 public:
-  typedef Interface CppObjectType;
-  typedef GTypeInterface BaseClassType;
+  using CppObjectType = Interface;
+  using BaseClassType = GTypeInterface;
 
   void add_interface(GType instance_type) const;
 };
diff --git a/glib/glibmm/private/object_p.h b/glib/glibmm/private/object_p.h
index bcac44d..98ee09b 100644
--- a/glib/glibmm/private/object_p.h
+++ b/glib/glibmm/private/object_p.h
@@ -11,9 +11,9 @@ namespace Glib
 class Object_Class : public Glib::Class
 {
 public:
-  typedef Object CppObjectType;
-  typedef GObject BaseObjectType;
-  typedef GObjectClass BaseClassType;
+  using CppObjectType = Object;
+  using BaseObjectType = GObject;
+  using BaseClassType = GObjectClass;
 
   static void class_init_function(void* g_class, void* class_data);
 
diff --git a/glib/glibmm/property.h b/glib/glibmm/property.h
index 3242bbd..1076989 100644
--- a/glib/glibmm/property.h
+++ b/glib/glibmm/property.h
@@ -171,8 +171,8 @@ template <class T>
 class Property : public PropertyBase
 {
 public:
-  typedef T PropertyType;
-  typedef Glib::Value<T> ValueType;
+  using PropertyType = T;
+  using ValueType = Glib::Value<T>;
 
   /**  Constructs a property of the @a object with the specified @a name.
    * For each instance of the object, the same property must be constructed with the same name.
diff --git a/glib/glibmm/propertyproxy.h b/glib/glibmm/propertyproxy.h
index 1d47b3c..bc27409 100644
--- a/glib/glibmm/propertyproxy.h
+++ b/glib/glibmm/propertyproxy.h
@@ -44,7 +44,7 @@ template <class T>
 class PropertyProxy : public PropertyProxy_Base
 {
 public:
-  typedef T PropertyType;
+  using PropertyType = T;
 
   PropertyProxy(ObjectBase* obj, const char* name) : PropertyProxy_Base(obj, name) {}
 
@@ -78,7 +78,7 @@ template <class T>
 class PropertyProxy_WriteOnly : public PropertyProxy_Base
 {
 public:
-  typedef T PropertyType;
+  using PropertyType = T;
 
   PropertyProxy_WriteOnly(ObjectBase* obj, const char* name) : PropertyProxy_Base(obj, name) {}
 
@@ -105,7 +105,7 @@ template <class T>
 class PropertyProxy_ReadOnly : public PropertyProxy_Base
 {
 public:
-  typedef T PropertyType;
+  using PropertyType = T;
 
   // obj is const, because this should be returned by const accessors.
   PropertyProxy_ReadOnly(const ObjectBase* obj, const char* name)
diff --git a/glib/glibmm/propertyproxy_base.h b/glib/glibmm/propertyproxy_base.h
index e8d6290..fdfb237 100644
--- a/glib/glibmm/propertyproxy_base.h
+++ b/glib/glibmm/propertyproxy_base.h
@@ -39,7 +39,7 @@ public:
   SignalProxyProperty(Glib::ObjectBase* obj, const gchar* property_name);
   ~SignalProxyProperty() noexcept;
 
-  typedef sigc::slot<void> SlotType;
+  using SlotType = sigc::slot<void>;
   sigc::connection connect(const SlotType& slot);
   /** @newin{2,48}
    */
diff --git a/glib/glibmm/random.h b/glib/glibmm/random.h
index d39660f..d934044 100644
--- a/glib/glibmm/random.h
+++ b/glib/glibmm/random.h
@@ -26,7 +26,7 @@
 #include <glib.h>
 
 extern "C" {
-typedef struct _GRand GRand;
+using GRand = struct _GRand;
 }
 
 namespace Glib
diff --git a/glib/glibmm/refptr.h b/glib/glibmm/refptr.h
index c9acef2..4d8a9c6 100644
--- a/glib/glibmm/refptr.h
+++ b/glib/glibmm/refptr.h
@@ -60,7 +60,7 @@ private:
    * T:dont_allow_use_in_glib_refptr_ is a public type, else it's true.
    * Example:
    * @code
-   * typedef int dont_allow_use_in_glib_refptr_;
+   * using dont_allow_use_in_glib_refptr_ = int;
    * @endcode
    */
   class is_allowed_type
diff --git a/glib/glibmm/sarray.h b/glib/glibmm/sarray.h
index 31f139b..95e2f08 100644
--- a/glib/glibmm/sarray.h
+++ b/glib/glibmm/sarray.h
@@ -32,7 +32,7 @@ namespace Glib
 /**
  * @deprecated Use a std::vector instead.
  */
-typedef Glib::ArrayHandle<Glib::ustring> SArray;
+using SArray = Glib::ArrayHandle<Glib::ustring>;
 }
 
 #endif // GLIBMM_DISABLE_DEPRECATED
diff --git a/glib/glibmm/signalproxy.h b/glib/glibmm/signalproxy.h
index 7237be0..458e6b1 100644
--- a/glib/glibmm/signalproxy.h
+++ b/glib/glibmm/signalproxy.h
@@ -153,8 +153,8 @@ template <class R, class... T>
 class SignalProxy : public SignalProxyNormal
 {
 public:
-  typedef sigc::slot<R, T...> SlotType;
-  typedef sigc::slot<void, T...> VoidSlotType;
+  using SlotType = sigc::slot<R, T...>;
+  using VoidSlotType = sigc::slot<void, T...>;
 
   SignalProxy(ObjectBase* obj, const SignalProxyInfo* info) : SignalProxyNormal(obj, info) {}
 
@@ -303,8 +303,8 @@ template <class R, class... T>
 class SignalProxyDetailedAnyType : public SignalProxyDetailed
 {
 public:
-  typedef sigc::slot<R, T...> SlotType;
-  typedef sigc::slot<void, T...> VoidSlotType;
+  using SlotType = sigc::slot<R, T...>;
+  using VoidSlotType = sigc::slot<void, T...>;
 
   SignalProxyDetailedAnyType(
     ObjectBase* obj, const SignalProxyInfo* info, const Glib::ustring& detail_name)
diff --git a/glib/glibmm/signalproxy_connectionnode.h b/glib/glibmm/signalproxy_connectionnode.h
index 1b226ed..88e98ee 100644
--- a/glib/glibmm/signalproxy_connectionnode.h
+++ b/glib/glibmm/signalproxy_connectionnode.h
@@ -24,8 +24,8 @@
 #include <glib.h>
 
 #ifndef DOXYGEN_SHOULD_SKIP_THIS
-typedef struct _GObject GObject;
-typedef struct _GClosure GClosure;
+using GObject = struct _GObject;
+using GClosure = struct _GClosure;
 #endif // DOXYGEN_SHOULD_SKIP_THIS
 
 namespace Glib
diff --git a/glib/glibmm/slisthandle.h b/glib/glibmm/slisthandle.h
index a952562..7bf1a9d 100644
--- a/glib/glibmm/slisthandle.h
+++ b/glib/glibmm/slisthandle.h
@@ -131,14 +131,14 @@ template <class Tr>
 class SListHandleIterator
 {
 public:
-  typedef typename Tr::CppType CppType;
-  typedef typename Tr::CType CType;
+  using CppType = typename Tr::CppType;
+  using CType = typename Tr::CType;
 
-  typedef std::forward_iterator_tag iterator_category;
-  typedef CppType value_type;
-  typedef std::ptrdiff_t difference_type;
-  typedef value_type reference;
-  typedef void pointer;
+  using iterator_category = std::forward_iterator_tag;
+  using value_type = CppType;
+  using difference_type = std::ptrdiff_t;
+  using reference = value_type;
+  using pointer = void;
 
   explicit inline SListHandleIterator(const GSList* node);
 
@@ -168,15 +168,15 @@ template <class T, class Tr = Glib::Container_Helpers::TypeTraits<T>>
 class SListHandle
 {
 public:
-  typedef typename Tr::CppType CppType;
-  typedef typename Tr::CType CType;
+  using CppType = typename Tr::CppType;
+  using CType = typename Tr::CType;
 
-  typedef CppType value_type;
-  typedef std::size_t size_type;
-  typedef std::ptrdiff_t difference_type;
+  using value_type = CppType;
+  using size_type = std::size_t;
+  using difference_type = std::ptrdiff_t;
 
-  typedef Glib::Container_Helpers::SListHandleIterator<Tr> const_iterator;
-  typedef Glib::Container_Helpers::SListHandleIterator<Tr> iterator;
+  using const_iterator = Glib::Container_Helpers::SListHandleIterator<Tr>;
+  using iterator = Glib::Container_Helpers::SListHandleIterator<Tr>;
 
   template <class Cont>
   inline SListHandle(const Cont& container);
diff --git a/glib/glibmm/threadpool.h b/glib/glibmm/threadpool.h
index 6bf4aec..f75f34d 100644
--- a/glib/glibmm/threadpool.h
+++ b/glib/glibmm/threadpool.h
@@ -25,7 +25,7 @@
 #include <sigc++/sigc++.h>
 
 extern "C" {
-typedef struct _GThreadPool GThreadPool;
+using GThreadPool = struct _GThreadPool;
 }
 
 namespace Glib
diff --git a/glib/glibmm/timer.h b/glib/glibmm/timer.h
index c99c602..2559ffa 100644
--- a/glib/glibmm/timer.h
+++ b/glib/glibmm/timer.h
@@ -24,7 +24,7 @@
  */
 
 extern "C" {
-typedef struct _GTimer GTimer;
+using GTimer = struct _GTimer;
 }
 
 namespace Glib
diff --git a/glib/glibmm/ustring.h b/glib/glibmm/ustring.h
index a207611..cf2ac0d 100644
--- a/glib/glibmm/ustring.h
+++ b/glib/glibmm/ustring.h
@@ -39,31 +39,31 @@ namespace Glib
 template <class T>
 struct IteratorTraits
 {
-  typedef typename T::iterator_category iterator_category;
-  typedef typename T::value_type value_type;
-  typedef typename T::difference_type difference_type;
-  typedef typename T::pointer pointer;
-  typedef typename T::reference reference;
+  using iterator_category = typename T::iterator_category;
+  using value_type = typename T::value_type;
+  using difference_type = typename T::difference_type;
+  using pointer = typename T::pointer;
+  using reference = typename T::reference;
 };
 
 template <class T>
 struct IteratorTraits<T*>
 {
-  typedef std::random_access_iterator_tag iterator_category;
-  typedef T value_type;
-  typedef std::ptrdiff_t difference_type;
-  typedef T* pointer;
-  typedef T& reference;
+  using iterator_category = std::random_access_iterator_tag;
+  using value_type = T;
+  using difference_type = std::ptrdiff_t;
+  using pointer = T*;
+  using reference = T&;
 };
 
 template <class T>
 struct IteratorTraits<const T*>
 {
-  typedef std::random_access_iterator_tag iterator_category;
-  typedef T value_type;
-  typedef std::ptrdiff_t difference_type;
-  typedef const T* pointer;
-  typedef const T& reference;
+  using iterator_category = std::random_access_iterator_tag;
+  using value_type = T;
+  using difference_type = std::ptrdiff_t;
+  using pointer = const T*;
+  using reference = const T&;
 };
 
 #endif /* GLIBMM_HAVE_STD_ITERATOR_TRAITS */
@@ -99,11 +99,11 @@ template <class T>
 class ustring_Iterator
 {
 public:
-  typedef std::bidirectional_iterator_tag iterator_category;
-  typedef gunichar value_type;
-  typedef std::string::difference_type difference_type;
-  typedef value_type reference;
-  typedef void pointer;
+  using iterator_category = std::bidirectional_iterator_tag;
+  using value_type = gunichar;
+  using difference_type = std::string::difference_type;
+  using reference = value_type;
+  using pointer = void;
 
   inline ustring_Iterator();
   inline ustring_Iterator(const ustring_Iterator<std::string::iterator>& other);
@@ -214,20 +214,20 @@ gunichar get_unichar_from_std_iterator(std::string::const_iterator pos) G_GNUC_P
 class ustring
 {
 public:
-  typedef std::string::size_type size_type;
-  typedef std::string::difference_type difference_type;
+  using size_type = std::string::size_type;
+  using difference_type = std::string::difference_type;
 
-  typedef gunichar value_type;
-  typedef gunichar& reference;
-  typedef const gunichar& const_reference;
+  using value_type = gunichar;
+  using reference = gunichar&;
+  using const_reference = const gunichar&;
 
-  typedef ustring_Iterator<std::string::iterator> iterator;
-  typedef ustring_Iterator<std::string::const_iterator> const_iterator;
+  using iterator = ustring_Iterator<std::string::iterator>;
+  using const_iterator = ustring_Iterator<std::string::const_iterator>;
 
 #ifndef GLIBMM_HAVE_SUN_REVERSE_ITERATOR
 
-  typedef std::reverse_iterator<iterator> reverse_iterator;
-  typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
+  using reverse_iterator = std::reverse_iterator<iterator>;
+  using const_reverse_iterator = std::reverse_iterator<const_iterator>;
 
 #else
 
@@ -863,9 +863,9 @@ public:
 
 private:
 #ifdef GLIBMM_HAVE_WIDE_STREAM
-  typedef std::wostringstream StreamType;
+  using StreamType = std::wostringstream;
 #else
-  typedef std::ostringstream StreamType;
+  using StreamType = std::ostringstream;
 #endif
   StreamType stream_;
 
diff --git a/glib/glibmm/value.h b/glib/glibmm/value.h
index 3a51628..c7f61af 100644
--- a/glib/glibmm/value.h
+++ b/glib/glibmm/value.h
@@ -134,7 +134,7 @@ protected:
 class ValueBase_Enum : public ValueBase
 {
 public:
-  typedef gint CType;
+  using CType = gint;
   static GType value_type() G_GNUC_CONST;
 
 #ifndef DOXYGEN_SHOULD_SKIP_THIS
@@ -152,7 +152,7 @@ protected:
 class ValueBase_Flags : public ValueBase
 {
 public:
-  typedef guint CType;
+  using CType = guint;
   static GType value_type() G_GNUC_CONST;
 
 #ifndef DOXYGEN_SHOULD_SKIP_THIS
@@ -170,7 +170,7 @@ protected:
 class ValueBase_String : public ValueBase
 {
 public:
-  typedef const gchar* CType;
+  using CType = const gchar*;
   static GType value_type() G_GNUC_CONST;
 
 #ifndef DOXYGEN_SHOULD_SKIP_THIS
@@ -200,8 +200,8 @@ template <class T>
 class Value_Boxed : public ValueBase_Boxed
 {
 public:
-  typedef T CppType;
-  typedef typename T::BaseObjectType* CType;
+  using CppType = T;
+  using CType = typename T::BaseObjectType*;
 
   static GType value_type() { return T::get_type(); }
 
@@ -219,8 +219,8 @@ template <class T>
 class Value<Glib::RefPtr<T>> : public ValueBase_Object
 {
 public:
-  typedef Glib::RefPtr<T> CppType;
-  typedef typename T::BaseObjectType* CType;
+  using CppType = Glib::RefPtr<T>;
+  using CType = typename T::BaseObjectType*;
 
   static GType value_type() { return T::get_base_type(); }
 
@@ -238,8 +238,8 @@ template <class T>
 class Value<Glib::RefPtr<const T>> : public ValueBase_Object
 {
 public:
-  typedef Glib::RefPtr<const T> CppType;
-  typedef typename T::BaseObjectType* CType;
+  using CppType = Glib::RefPtr<const T>;
+  using CType = typename T::BaseObjectType*;
 
   static GType value_type() { return T::get_base_type(); }
 
@@ -268,7 +268,7 @@ template <>
 class Value<std::string> : public ValueBase_String
 {
 public:
-  typedef std::string CppType;
+  using CppType = std::string;
 
   void set(const std::string& data);
   std::string get() const { return get_cstring(); }
@@ -281,7 +281,7 @@ template <>
 class Value<Glib::ustring> : public ValueBase_String
 {
 public:
-  typedef Glib::ustring CppType;
+  using CppType = Glib::ustring;
 
   void set(const Glib::ustring& data);
   Glib::ustring get() const { return get_cstring(); }
@@ -294,7 +294,7 @@ template <class T>
 class Value_Enum : public ValueBase_Enum
 {
 public:
-  typedef T CppType;
+  using CppType = T;
 
   void set(CppType data) { set_enum(data); }
   CppType get() const { return CppType(get_enum()); }
@@ -307,7 +307,7 @@ template <class T>
 class Value_Flags : public ValueBase_Flags
 {
 public:
-  typedef T CppType;
+  using CppType = T;
 
   void set(CppType data) { set_flags(data); }
   CppType get() const { return CppType(get_flags()); }
diff --git a/glib/glibmm/value_custom.h b/glib/glibmm/value_custom.h
index f94bf1b..d3ebfee 100644
--- a/glib/glibmm/value_custom.h
+++ b/glib/glibmm/value_custom.h
@@ -61,8 +61,8 @@ template <class T, class PtrT>
 class Value_Pointer : public ValueBase_Object
 {
 public:
-  typedef PtrT CppType;
-  typedef void* CType;
+  using CppType = PtrT;
+  using CType = void*;
 
   static inline GType value_type() G_GNUC_CONST;
 
@@ -100,8 +100,8 @@ template <class T>
 class Value : public ValueBase_Boxed
 {
 public:
-  typedef T CppType;
-  typedef T* CType;
+  using CppType = T;
+  using CType = T*;
 
   static GType value_type() G_GNUC_CONST;
 
diff --git a/glib/glibmm/vectorutils.h b/glib/glibmm/vectorutils.h
index 40231db..6ea434a 100644
--- a/glib/glibmm/vectorutils.h
+++ b/glib/glibmm/vectorutils.h
@@ -93,7 +93,7 @@ template <class Tr>
 typename Tr::CType*
 create_array(typename std::vector<typename Tr::CppType>::const_iterator pbegin, std::size_t size)
 {
-  typedef typename Tr::CType CType;
+  using CType = typename Tr::CType;
 
   CType* const array(static_cast<CType*>(g_malloc((size + 1) * sizeof(CType))));
   CType* const array_end(array + size);
@@ -160,14 +160,14 @@ template <class Tr>
 class ArrayIterator
 {
 public:
-  typedef typename Tr::CppType CppType;
-  typedef typename Tr::CType CType;
+  using CppType = typename Tr::CppType;
+  using CType = typename Tr::CType;
 
-  typedef std::random_access_iterator_tag iterator_category;
-  typedef CppType value_type;
-  typedef std::ptrdiff_t difference_type;
-  typedef value_type reference;
-  typedef void pointer;
+  using iterator_category = std::random_access_iterator_tag;
+  using value_type = CppType;
+  using difference_type = std::ptrdiff_t;
+  using reference = value_type;
+  using pointer = void;
 
   explicit inline ArrayIterator(const CType* pos);
 
@@ -201,14 +201,14 @@ template <class Tr>
 class ListIterator
 {
 public:
-  typedef typename Tr::CppType CppType;
-  typedef typename Tr::CType CType;
+  using CppType = typename Tr::CppType;
+  using CType = typename Tr::CType;
 
-  typedef std::forward_iterator_tag iterator_category;
-  typedef CppType value_type;
-  typedef std::ptrdiff_t difference_type;
-  typedef value_type reference;
-  typedef void pointer;
+  using iterator_category = std::forward_iterator_tag;
+  using value_type = CppType;
+  using difference_type = std::ptrdiff_t;
+  using reference = value_type;
+  using pointer = void;
 
   explicit inline ListIterator(const GList* node);
 
@@ -227,14 +227,14 @@ template <class Tr>
 class SListIterator
 {
 public:
-  typedef typename Tr::CppType CppType;
-  typedef typename Tr::CType CType;
+  using CppType = typename Tr::CppType;
+  using CType = typename Tr::CType;
 
-  typedef std::forward_iterator_tag iterator_category;
-  typedef CppType value_type;
-  typedef std::ptrdiff_t difference_type;
-  typedef value_type reference;
-  typedef void pointer;
+  using iterator_category = std::forward_iterator_tag;
+  using value_type = CppType;
+  using difference_type = std::ptrdiff_t;
+  using reference = value_type;
+  using pointer = void;
 
   explicit inline SListIterator(const GSList* node);
 
@@ -275,8 +275,8 @@ template <typename Tr>
 class ArrayKeeper
 {
 public:
-  typedef typename Tr::CppType CppType;
-  typedef typename Tr::CType CType;
+  using CppType = typename Tr::CppType;
+  using CType = typename Tr::CType;
 
   /** Constructs an ArrayKeeper holding @a array of size @a array_size.
    * @a ownership tells what should be destroyed with keeper destruction:
@@ -335,8 +335,8 @@ template <typename Tr>
 class GListKeeper
 {
 public:
-  typedef typename Tr::CppType CppType;
-  typedef typename Tr::CType CType;
+  using CppType = typename Tr::CppType;
+  using CType = typename Tr::CType;
 
   /** Constructs an GListKeeper holding @a glist.
    * @a ownership tells what should be destroyed with keeper destruction:
@@ -392,8 +392,8 @@ template <typename Tr>
 class GSListKeeper
 {
 public:
-  typedef typename Tr::CppType CppType;
-  typedef typename Tr::CType CType;
+  using CppType = typename Tr::CppType;
+  using CType = typename Tr::CType;
 
   /** Constructs an GSListKeeper holding @a gslist.
    * @a ownership tells what should be destroyed with keeper destruction:
@@ -467,11 +467,11 @@ template <typename T, typename Tr = Glib::Container_Helpers::TypeTraits<T>>
 class ArrayHandler
 {
 public:
-  typedef typename Tr::CType CType;
-  typedef T CppType;
-  typedef std::vector<CppType> VectorType;
-  typedef typename Glib::Container_Helpers::ArrayKeeper<Tr> ArrayKeeperType;
-  typedef typename Glib::Container_Helpers::ArrayIterator<Tr> ArrayIteratorType;
+  using CType = typename Tr::CType;
+  using CppType = T;
+  using VectorType = std::vector<CppType>;
+  using ArrayKeeperType = typename Glib::Container_Helpers::ArrayKeeper<Tr>;
+  using ArrayIteratorType = typename Glib::Container_Helpers::ArrayIterator<Tr>;
 
   // maybe think about using C++0x move constructors?
   static VectorType array_to_vector(
@@ -484,9 +484,9 @@ template <>
 class ArrayHandler<bool>
 {
 public:
-  typedef gboolean CType;
-  typedef bool CppType;
-  typedef std::vector<bool> VectorType;
+  using CType = gboolean;
+  using CppType = bool;
+  using VectorType = std::vector<bool>;
   typedef Glib::Container_Helpers::ArrayKeeper<Glib::Container_Helpers::TypeTraits<bool>>
     ArrayKeeperType;
   typedef Glib::Container_Helpers::ArrayIterator<Glib::Container_Helpers::TypeTraits<bool>>
@@ -530,11 +530,11 @@ template <typename T, typename Tr = Glib::Container_Helpers::TypeTraits<T>>
 class ListHandler
 {
 public:
-  typedef typename Tr::CType CType;
-  typedef T CppType;
-  typedef std::vector<CppType> VectorType;
-  typedef typename Glib::Container_Helpers::GListKeeper<Tr> GListKeeperType;
-  typedef typename Glib::Container_Helpers::ListIterator<Tr> ListIteratorType;
+  using CType = typename Tr::CType;
+  using CppType = T;
+  using VectorType = std::vector<CppType>;
+  using GListKeeperType = typename Glib::Container_Helpers::GListKeeper<Tr>;
+  using ListIteratorType = typename Glib::Container_Helpers::ListIterator<Tr>;
 
   // maybe think about using C++0x move constructors?
   static VectorType list_to_vector(GList* glist, Glib::OwnershipType ownership);
@@ -571,11 +571,11 @@ template <typename T, typename Tr = Glib::Container_Helpers::TypeTraits<T>>
 class SListHandler
 {
 public:
-  typedef typename Tr::CType CType;
-  typedef T CppType;
-  typedef std::vector<CppType> VectorType;
-  typedef typename Glib::Container_Helpers::GSListKeeper<Tr> GSListKeeperType;
-  typedef typename Glib::Container_Helpers::SListIterator<Tr> SListIteratorType;
+  using CType = typename Tr::CType;
+  using CppType = T;
+  using VectorType = std::vector<CppType>;
+  using GSListKeeperType = typename Glib::Container_Helpers::GSListKeeper<Tr>;
+  using SListIteratorType = typename Glib::Container_Helpers::SListIterator<Tr>;
 
   // maybe think about using C++0x move constructors?
   static VectorType slist_to_vector(GSList* gslist, Glib::OwnershipType ownership);
@@ -847,7 +847,7 @@ inline GListKeeper<Tr>::GListKeeper(const GListKeeper& keeper)
 template <typename Tr>
 GListKeeper<Tr>::~GListKeeper() noexcept
 {
-  typedef typename Tr::CTypeNonConst CTypeNonConst;
+  using CTypeNonConst = typename Tr::CTypeNonConst;
 
   if (glist_ && ownership_ != Glib::OWNERSHIP_NONE)
   {
@@ -888,7 +888,7 @@ inline GSListKeeper<Tr>::GSListKeeper(const GSListKeeper& keeper)
 template <typename Tr>
 GSListKeeper<Tr>::~GSListKeeper() noexcept
 {
-  typedef typename Tr::CTypeNonConst CTypeNonConst;
+  using CTypeNonConst = typename Tr::CTypeNonConst;
   if (gslist_ && ownership_ != Glib::OWNERSHIP_NONE)
   {
     if (ownership_ != Glib::OWNERSHIP_SHALLOW)
diff --git a/glib/glibmm/wrap.cc b/glib/glibmm/wrap.cc
index 67861d6..f30fea9 100644
--- a/glib/glibmm/wrap.cc
+++ b/glib/glibmm/wrap.cc
@@ -36,7 +36,7 @@ namespace
 // on any platform.  Nevertheless, indexing a vector costs almost nothing
 // compared to a map lookup.
 
-typedef std::vector<Glib::WrapNewFunction> WrapFuncTable;
+using WrapFuncTable = std::vector<Glib::WrapNewFunction>;
 
 static WrapFuncTable* wrap_func_table = nullptr;
 
diff --git a/glib/glibmm/wrap.h b/glib/glibmm/wrap.h
index 36dff85..eec39bb 100644
--- a/glib/glibmm/wrap.h
+++ b/glib/glibmm/wrap.h
@@ -31,7 +31,7 @@ class ObjectBase;
 class Object;
 
 // Type of the per-class wrap_new() functions.
-typedef Glib::ObjectBase* (*WrapNewFunction)(GObject*);
+using WrapNewFunction = Glib::ObjectBase*(*)(GObject*);
 
 // Setup and free the structures used by wrap_register().
 // Both functions might be called more than once.
diff --git a/tests/glibmm_btree/main.cc b/tests/glibmm_btree/main.cc
index 647542b..dbe0f85 100644
--- a/tests/glibmm_btree/main.cc
+++ b/tests/glibmm_btree/main.cc
@@ -1,7 +1,7 @@
 #include <glibmm.h>
 
-typedef Glib::ustring type_key_value;
-typedef type_key_value* type_p_key_value;
+using type_key_value = Glib::ustring;
+using type_p_key_value = type_key_value*;
 
 static int
 my_search(const type_key_value& key_a, const type_key_value& key_b)
diff --git a/tests/glibmm_interface_move/main.cc b/tests/glibmm_interface_move/main.cc
index 99dbd58..c097cbb 100644
--- a/tests/glibmm_interface_move/main.cc
+++ b/tests/glibmm_interface_move/main.cc
@@ -80,7 +80,7 @@ class TestInterface;
 class TestInterface_Class : public Glib::Interface_Class
 {
 public:
-  typedef TestInterface BaseClassType;
+  using BaseClassType = TestInterface;
 
   friend class TestInterface;
 
@@ -107,7 +107,7 @@ public:
 class TestInterface : public Glib::Interface
 {
 protected:
-  typedef TestInterface_Class CppClassType;
+  using CppClassType = TestInterface_Class;
 
   TestInterface() : Glib::Interface(derived_interface_class_.init()) {}
 
@@ -147,8 +147,8 @@ private:
 class DerivedObject_Class : public Glib::Class
 {
 public:
-  typedef GObjectClass BaseClassType;
-  typedef Glib::Object_Class CppClassParent;
+  using BaseClassType = GObjectClass;
+  using CppClassParent = Glib::Object_Class;
 
   static void class_init_function(void* g_class, void* class_data)
   {
@@ -183,7 +183,7 @@ TestInterface::CppClassType TestInterface::derived_interface_class_; // initiali
 class DerivedObject : public Glib::Object, public TestInterface
 {
 public:
-  typedef DerivedObject_Class CppClassType;
+  using CppClassType = DerivedObject_Class;
 
   // A real application would never make the constructor public.
   // It would instead have a protected constructor and a public create() method.
diff --git a/tests/glibmm_nodetree/main.cc b/tests/glibmm_nodetree/main.cc
index fffdafa..0554c48 100644
--- a/tests/glibmm_nodetree/main.cc
+++ b/tests/glibmm_nodetree/main.cc
@@ -1,7 +1,7 @@
 #include <glibmm.h>
 #include <iostream>
 
-typedef Glib::NodeTree<const std::string> type_nodetree_string;
+using type_nodetree_string = Glib::NodeTree<const std::string>;
 
 static bool
 node_build_string(type_nodetree_string& node, std::string& string)
diff --git a/tests/glibmm_null_containerhandle/main.cc b/tests/glibmm_null_containerhandle/main.cc
index 3353370..80d8350 100644
--- a/tests/glibmm_null_containerhandle/main.cc
+++ b/tests/glibmm_null_containerhandle/main.cc
@@ -26,7 +26,7 @@ int
 main()
 {
   Gio::init();
-  typedef Glib::RefPtr<Gio::Credentials> CrePtr;
+  using CrePtr = Glib::RefPtr<Gio::Credentials>;
 
   std::vector<CrePtr> v1(Glib::ArrayHandle<CrePtr>(nullptr, Glib::OWNERSHIP_DEEP));
   std::vector<CrePtr> v2(Glib::ArrayHandle<CrePtr>(nullptr, 5, Glib::OWNERSHIP_DEEP));
diff --git a/tests/glibmm_null_vectorutils/main.cc b/tests/glibmm_null_vectorutils/main.cc
index a686ade..b658b39 100644
--- a/tests/glibmm_null_vectorutils/main.cc
+++ b/tests/glibmm_null_vectorutils/main.cc
@@ -24,7 +24,7 @@ int
 main()
 {
   Gio::init();
-  typedef Glib::RefPtr<Gio::Credentials> CrePtr;
+  using CrePtr = Glib::RefPtr<Gio::Credentials>;
 
   std::vector<CrePtr> v1(
     Glib::ArrayHandler<CrePtr>::array_to_vector(nullptr, Glib::OWNERSHIP_DEEP));
diff --git a/tests/glibmm_variant/main.cc b/tests/glibmm_variant/main.cc
index e5877a8..8ac5d50 100644
--- a/tests/glibmm_variant/main.cc
+++ b/tests/glibmm_variant/main.cc
@@ -52,7 +52,7 @@ main(int, char**)
 
   // Dict:
 
-  typedef std::pair<Glib::ustring, Glib::ustring> TypeDictEntry;
+  using TypeDictEntry = std::pair<Glib::ustring, Glib::ustring>;
 
   TypeDictEntry dict_entry("A key", "A value");
 
@@ -68,7 +68,7 @@ main(int, char**)
 
   ostr << std::endl;
 
-  typedef std::map<unsigned, Glib::ustring> TypeDict;
+  using TypeDict = std::map<unsigned, Glib::ustring>;
 
   TypeDict orig_dict;
 
@@ -112,7 +112,7 @@ main(int, char**)
   }
 
   // std::vector< std::map< Glib::ustring, Glib::Variant<int> > >
-  typedef std::map<Glib::ustring, Glib::Variant<int>> ComplexDictType;
+  using ComplexDictType = std::map<Glib::ustring, Glib::Variant<int>>;
 
   ComplexDictType complex_dict1;
   ComplexDictType complex_dict2;
@@ -132,7 +132,7 @@ main(int, char**)
     complex_dict2.insert(std::pair<Glib::ustring, Glib::Variant<int>>("Map 2 " + s, v));
   }
 
-  typedef std::vector<std::map<Glib::ustring, Glib::Variant<int>>> ComplexVecType;
+  using ComplexVecType = std::vector<std::map<Glib::ustring, Glib::Variant<int>>>;
 
   ComplexVecType complex_vector = { complex_dict1, complex_dict2 };
 
@@ -275,7 +275,7 @@ test_dynamic_cast_composite_types()
 
   try
   {
-    typedef std::map<Glib::ustring, std::vector<std::string>> composite_type;
+    using composite_type = std::map<Glib::ustring, std::vector<std::string>>;
     auto derived = Glib::VariantBase::cast_dynamic<Glib::Variant<composite_type>>(cppdict);
 
     ostr << "Cast composite type (get_type_string()=" << derived.get_type_string()
@@ -352,8 +352,8 @@ test_dynamic_cast()
   }
 
   // A variant of type a{sv}
-  typedef std::map<Glib::ustring, Glib::VariantBase> type_map_sv;
-  typedef Glib::Variant<type_map_sv> type_dict_sv;
+  using type_map_sv = std::map<Glib::ustring, Glib::VariantBase>;
+  using type_dict_sv = Glib::Variant<type_map_sv>;
   g_assert((type_dict_sv::variant_type().get_string()) == "a{sv}");
 
   type_dict_sv var_map;
diff --git a/tools/extra_defs_gen/generate_extra_defs.h b/tools/extra_defs_gen/generate_extra_defs.h
index dc95262..9d960e3 100644
--- a/tools/extra_defs_gen/generate_extra_defs.h
+++ b/tools/extra_defs_gen/generate_extra_defs.h
@@ -26,7 +26,7 @@
 /** Function pointer type for functions that determine if a GType is a pointer
  * type.
  */
-typedef bool (*GTypeIsAPointerFunc)(GType gtype);
+using GTypeIsAPointerFunc = bool(*)(GType gtype);
 
 /** Default extra defs utility function to determine if a GType is a pointer
  * type.


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