@@ -85,32 +85,32 @@ class Errata
8585 // / Implementation class.
8686 struct Data ;
8787 // / Handle for implementation class instance.
88- typedef IntrusivePtr<Data> ImpPtr ;
88+ using ImpPtr = IntrusivePtr<Data>;
8989
9090public:
91- typedef Errata self; // / Self reference type.
91+ using self = Errata ; // / Self reference type.
9292
9393 // / Message ID.
94- typedef NumericType<unsigned int , struct MsgIdTag > Id ;
94+ using Id = NumericType<unsigned int , struct MsgIdTag >;
9595
9696 /* Tag / level / code severity.
9797 This is intended for clients to use to provide additional
9898 classification of a message. A severity code, as for syslog,
9999 is a common use.
100100
101101 */
102- typedef NumericType<unsigned int , struct CodeTag > Code ;
102+ using Code = NumericType<unsigned int , struct CodeTag >;
103103 struct Message ;
104104
105- typedef std::deque<Message> Container ; // /< Storage type for messages.
105+ using Container = std::deque<Message>; // /< Storage type for messages.
106106 // We iterate backwards to look like a stack.
107- // typedef Container::reverse_iterator iterator ; ///< Message iteration.
107+ // using iterator = Container::reverse_iterator; ///< Message iteration.
108108 // / Message const iteration.
109- // typedef Container::const_reverse_iterator const_iterator ;
109+ // using const_iterator = Container::const_reverse_iterator;
110110 // / Reverse message iteration.
111- // typedef Container::iterator reverse_iterator ;
111+ // using reverse_iterator = Container::iterator;
112112 // / Reverse constant message iteration.
113- // typedef Container::const_iterator const_reverse_iterator ;
113+ // using const_reverse_iterator = Container::const_iterator;
114114
115115 // / Default constructor - empty errata, very fast.
116116 Errata ();
@@ -288,8 +288,8 @@ class Errata
288288 class Sink : public IntrusivePtrCounter
289289 {
290290 public:
291- typedef Sink self; // /< Self reference type.
292- typedef IntrusivePtr<self> Handle ; // /< Handle type.
291+ using self = Sink; // /< Self reference type.
292+ using Handle = IntrusivePtr<self>; // /< Handle type.
293293
294294 // / Handle an abandoned errata.
295295 virtual void operator ()(Errata const &) const = 0;
@@ -301,7 +301,7 @@ class Errata
301301 static void registerSink (Sink::Handle const &s);
302302
303303 // / Register a function as a sink.
304- typedef void (*SinkHandlerFunction )(Errata const &);
304+ using SinkHandlerFunction = void (*)(Errata const &);
305305
306306 // Wrapper class to support registering functions as sinks.
307307 struct SinkFunctionWrapper : public Sink {
@@ -374,7 +374,7 @@ extern std::ostream &operator<<(std::ostream &os, Errata const &stat);
374374
375375// / Storage for a single message.
376376struct Errata ::Message {
377- typedef Message self; // /< Self reference type.
377+ using self = Message ; // /< Self reference type.
378378
379379 // / Default constructor.
380380 // / The message has Id = 0, default code, and empty text.
@@ -447,7 +447,7 @@ struct Errata::Message {
447447 static Code Default_Code;
448448
449449 // / Type for overriding success message test.
450- typedef bool (*SuccessTest )(Message const &m);
450+ using SuccessTest = bool (*)(Message const &m);
451451
452452 /* * Success message test.
453453
@@ -488,7 +488,7 @@ struct Errata::Message {
488488 mainly because the client can't see this class so we can't
489489*/
490490struct Errata ::Data : public IntrusivePtrCounter {
491- typedef Data self; // /< Self reference type.
491+ using self = Data ; // /< Self reference type.
492492
493493 // ! Default constructor.
494494 Data ();
@@ -517,8 +517,8 @@ struct Errata::Data : public IntrusivePtrCounter {
517517class Errata ::iterator : public Errata::Container::reverse_iterator
518518{
519519public:
520- typedef iterator self; // /< Self reference type.
521- typedef Errata::Container::reverse_iterator super ; // /< Parent type.
520+ using self = iterator; // /< Self reference type.
521+ using super = Errata::Container::reverse_iterator; // /< Parent type.
522522 iterator (); // /< Default constructor.
523523 // / Copy constructor.
524524 iterator (self const &that // /< Source instance.
@@ -540,8 +540,8 @@ class Errata::iterator : public Errata::Container::reverse_iterator
540540class Errata ::const_iterator : public Errata::Container::const_reverse_iterator
541541{
542542public:
543- typedef const_iterator self; // /< Self reference type.
544- typedef Errata::Container::const_reverse_iterator super ; // /< Parent type.
543+ using self = const_iterator; // /< Self reference type.
544+ using super = Errata::Container::const_reverse_iterator; // /< Parent type.
545545 const_iterator (); // /< Default constructor.
546546 // / Copy constructor.
547547 const_iterator (self const &that // /< Source instance.
@@ -601,9 +601,9 @@ struct RvBase {
601601 asynchronously.
602602 */
603603template <typename R> struct Rv : public RvBase {
604- typedef Rv self; // /< Standard self reference type.
605- typedef RvBase super; // /< Standard super class reference type.
606- typedef R Result; // /< Type of result value.
604+ using self = Rv; // /< Standard self reference type.
605+ using super = RvBase ; // /< Standard super class reference type.
606+ using Result = R; // /< Type of result value.
607607
608608 Result _result; // /< The actual result of the function.
609609
0 commit comments