diff --git a/src/sst/core/clock.h b/src/sst/core/clock.h index eb53709a2..639e906b3 100644 --- a/src/sst/core/clock.h +++ b/src/sst/core/clock.h @@ -102,8 +102,8 @@ class Clock : public Action std::string toString() const override; private: - /* typedef std::list HandlerMap_t; */ - typedef std::vector StaticHandlerMap_t; + /* using HandlerMap_t = std::list; */ + using StaticHandlerMap_t = std::vector; Clock() {} diff --git a/src/sst/core/componentInfo.h b/src/sst/core/componentInfo.h index 41d712b4e..165487fa0 100644 --- a/src/sst/core/componentInfo.h +++ b/src/sst/core/componentInfo.h @@ -42,7 +42,7 @@ class ComponentInfo { public: - typedef std::vector statEnableList_t; /*!< List of Enabled Statistics */ + using statEnableList_t = std::vector; /*!< List of Enabled Statistics */ // Share Flags for SubComponent loading static const uint64_t SHARE_PORTS = 0x1; @@ -285,8 +285,8 @@ class ComponentInfoMap std::unordered_set dataByID; public: - typedef std::unordered_set::const_iterator - const_iterator; + using const_iterator = + std::unordered_set::const_iterator; const_iterator begin() const { return dataByID.begin(); } diff --git a/src/sst/core/configGraph.h b/src/sst/core/configGraph.h index 87bddbcad..b2cd00ef0 100644 --- a/src/sst/core/configGraph.h +++ b/src/sst/core/configGraph.h @@ -38,8 +38,8 @@ class Config; class TimeLord; class ConfigGraph; -typedef SparseVectorMap ComponentIdMap_t; -typedef std::vector LinkIdMap_t; +using ComponentIdMap_t = SparseVectorMap; +using LinkIdMap_t = std::vector; /** Represents the configuration of a generic Link */ class ConfigLink : public SST::Core::Serialization::serializable @@ -213,7 +213,7 @@ class ConfigStatOutput : public SST::Core::Serialization::serializable ImplementSerializable(SST::ConfigStatOutput) }; -typedef SparseVectorMap ConfigLinkMap_t; +using ConfigLinkMap_t = SparseVectorMap; /** Class that represents a PortModule in ConfigGraph @@ -396,16 +396,16 @@ class ConfigComponent : public SST::Core::Serialization::serializable }; /** Map names to Links */ -// typedef std::map ConfigLinkMap_t; -// typedef SparseVectorMap ConfigLinkMap_t; +// using ConfigLinkMap_t = std::map; +// using ConfigLinkMap_t = SparseVectorMap; /** Map IDs to Components */ -typedef SparseVectorMap ConfigComponentMap_t; +using ConfigComponentMap_t = SparseVectorMap; /** Map names to Components */ -typedef std::map ConfigComponentNameMap_t; +using ConfigComponentNameMap_t = std::map; /** Map names to Parameter Sets: XML only */ -typedef std::map ParamsMap_t; +using ParamsMap_t = std::map; /** Map names to variable values: XML only */ -typedef std::map VariableMap_t; +using VariableMap_t = std::map; class PartitionGraph; @@ -645,8 +645,8 @@ class PartitionLink } }; -typedef SparseVectorMap PartitionComponentMap_t; -typedef SparseVectorMap PartitionLinkMap_t; +using PartitionComponentMap_t = SparseVectorMap; +using PartitionLinkMap_t = SparseVectorMap; class PartitionGraph { diff --git a/src/sst/core/eli/elementbuilder.h b/src/sst/core/eli/elementbuilder.h index cde12c41f..13c721e78 100644 --- a/src/sst/core/eli/elementbuilder.h +++ b/src/sst/core/eli/elementbuilder.h @@ -21,7 +21,7 @@ namespace SST::ELI { template struct Builder { - typedef Base* (*createFxn)(Args...); + using createFxn = Base* (*)(Args...); virtual Base* create(Args... ctorArgs) = 0; diff --git a/src/sst/core/eli/simpleInfo.h b/src/sst/core/eli/simpleInfo.h index 077aaf867..39aad8760 100644 --- a/src/sst/core/eli/simpleInfo.h +++ b/src/sst/core/eli/simpleInfo.h @@ -38,10 +38,10 @@ class checkForELI_getSimpleInfoFunction template struct check; - typedef char Match; - typedef long NotMatch; + using Match = char; + using NotMatch = long; - typedef const InfoType& (*functionsig)(SimpleInfoPlaceHolder); + using functionsig = const InfoType& (*)(SimpleInfoPlaceHolder); template static Match HasFunction(check*); diff --git a/src/sst/core/event.h b/src/sst/core/event.h index 737aa8167..3534b3ed5 100644 --- a/src/sst/core/event.h +++ b/src/sst/core/event.h @@ -67,9 +67,9 @@ class Event : public Activity using Handler2 = SSTHandler2; /** Type definition of unique identifiers */ - typedef std::pair id_type; + using id_type = std::pair; /** Constant, default value for id_types */ - static const id_type NO_ID; + static const id_type NO_ID; Event() : Activity(), delivery_info(0) { diff --git a/src/sst/core/impl/timevortex/timeVortexBinnedMap.h b/src/sst/core/impl/timevortex/timeVortexBinnedMap.h index dbdfc947f..0cfdd6fc4 100644 --- a/src/sst/core/impl/timevortex/timeVortexBinnedMap.h +++ b/src/sst/core/impl/timevortex/timeVortexBinnedMap.h @@ -150,7 +150,7 @@ class TimeVortexBinnedMapBase : public TimeVortex // for concurrent access. TimeUnit* current_time_unit; - typedef std::map mapType_t; + using mapType_t = std::map; // Accessed by multiple threads, must be locked when accessing mapType_t map; diff --git a/src/sst/core/impl/timevortex/timeVortexPQ.h b/src/sst/core/impl/timevortex/timeVortexPQ.h index dbe02a40d..8cdbf3f1d 100644 --- a/src/sst/core/impl/timevortex/timeVortexPQ.h +++ b/src/sst/core/impl/timevortex/timeVortexPQ.h @@ -59,7 +59,7 @@ class TimeVortexPQBase : public TimeVortex virtual void fixup_handlers() override; private: - typedef std::priority_queue, Activity::greater> dataType_t; + using dataType_t = std::priority_queue, Activity::greater>; template S& getContainer(std::priority_queue& q) diff --git a/src/sst/core/interfaces/simpleNetwork.h b/src/sst/core/interfaces/simpleNetwork.h index 01200aaa0..32f2ba049 100644 --- a/src/sst/core/interfaces/simpleNetwork.h +++ b/src/sst/core/interfaces/simpleNetwork.h @@ -38,10 +38,10 @@ namespace SST::Interfaces { class SimpleNetwork : public SubComponent { public: - SST_ELI_REGISTER_SUBCOMPONENT_API(SST::Interfaces::SimpleNetwork,int) + SST_ELI_REGISTER_SUBCOMPONENT_API(SST::Interfaces::SimpleNetwork, int) /** All Addresses can be 64-bit */ - typedef int64_t nid_t; + using nid_t = int64_t; #define PRI_NID PRIi64 static const nid_t INIT_BROADCAST_ADDR; @@ -96,11 +96,11 @@ class SimpleNetwork : public SubComponent /** * Trace types */ - typedef enum { + enum TraceType { NONE, /*!< No tracing enabled */ ROUTE, /*!< Trace route information only */ FULL /*!< Trace all movements of packets through network */ - } TraceType; + }; /** Constructor */ Request() : diff --git a/src/sst/core/interfaces/stdMem.h b/src/sst/core/interfaces/stdMem.h index 11d64042b..29b994596 100644 --- a/src/sst/core/interfaces/stdMem.h +++ b/src/sst/core/interfaces/stdMem.h @@ -103,7 +103,7 @@ class StandardMem : public SubComponent SST_ELI_REGISTER_SUBCOMPONENT_API(SST::Interfaces::StandardMem,TimeConverter*,HandlerBase*) /** All Addresses can be 64-bit */ - typedef uint64_t Addr; + using Addr = uint64_t; #define PRI_ADDR PRIx64 /** @@ -112,8 +112,8 @@ class StandardMem : public SubComponent class Request { public: - typedef uint64_t id_t; - typedef uint32_t flags_t; + using id_t = uint64_t; + using flags_t = uint32_t; /** Flags that modify requests. * Each bit in a 32-bit field (flags_t) defines a seperate flag. diff --git a/src/sst/core/interprocess/ipctunnel.h b/src/sst/core/interprocess/ipctunnel.h index beab67943..19deb33c1 100644 --- a/src/sst/core/interprocess/ipctunnel.h +++ b/src/sst/core/interprocess/ipctunnel.h @@ -39,7 +39,7 @@ template class IPCTunnel { - typedef SST::Core::Interprocess::CircularBuffer CircBuff_t; + using CircBuff_t = SST::Core::Interprocess::CircularBuffer; struct InternalSharedData { diff --git a/src/sst/core/interprocess/mmapparent.cc b/src/sst/core/interprocess/mmapparent.cc index 74aa8924d..5f7bfd6a7 100644 --- a/src/sst/core/interprocess/mmapparent.cc +++ b/src/sst/core/interprocess/mmapparent.cc @@ -17,5 +17,5 @@ #include "sst/core/interprocess/tunneldef.h" -typedef SST::Core::Interprocess::TunnelDef testtunnel; +using testtunnel = SST::Core::Interprocess::TunnelDef; template class SST::Core::Interprocess::MMAPParent; diff --git a/src/sst/core/interprocess/shmparent.cc b/src/sst/core/interprocess/shmparent.cc index 624cba58b..33a9459e8 100644 --- a/src/sst/core/interprocess/shmparent.cc +++ b/src/sst/core/interprocess/shmparent.cc @@ -18,7 +18,7 @@ #include "sst/core/interprocess/shmchild.h" #include "sst/core/interprocess/tunneldef.h" -typedef SST::Core::Interprocess::TunnelDef testtunnel; +using testtunnel = SST::Core::Interprocess::TunnelDef; template class SST::Core::Interprocess::SHMParent; template class SST::Core::Interprocess::SHMChild; diff --git a/src/sst/core/interprocess/tunneldef.h b/src/sst/core/interprocess/tunneldef.h index 290f387b7..a45361f35 100644 --- a/src/sst/core/interprocess/tunneldef.h +++ b/src/sst/core/interprocess/tunneldef.h @@ -54,7 +54,7 @@ template class TunnelDef { - typedef SST::Core::Interprocess::CircularBuffer CircBuff_t; + using CircBuff_t = SST::Core::Interprocess::CircularBuffer; public: /** Create a new tunnel diff --git a/src/sst/core/model/element_python.h b/src/sst/core/model/element_python.h index 2273d81a1..4e2c7ae81 100644 --- a/src/sst/core/model/element_python.h +++ b/src/sst/core/model/element_python.h @@ -19,7 +19,7 @@ namespace SST { -typedef void* (*genPythonModuleFunction)(void); +using genPythonModuleFunction = void* (*)(void); /** Class to represent the code that needs to be added to create the * python module struture for the library. diff --git a/src/sst/core/oneshot.h b/src/sst/core/oneshot.h index e268a61b7..477e2d8c3 100644 --- a/src/sst/core/oneshot.h +++ b/src/sst/core/oneshot.h @@ -81,13 +81,13 @@ class OneShot : public Action NotSerializable(SST::OneShot) private: - typedef std::vector HandlerList_t; + using HandlerList_t = std::vector; // Since this only gets fixed latency events, the times will fire // in order of arrival. No need to use a full map, a double ended // queue will work just as well - // typedef std::map HandlerVectorMap_t; - typedef std::deque> HandlerVectorMap_t; + // using HandlerVectorMap_t = std::map; + using HandlerVectorMap_t = std::deque>; // Generic constructor for serialization OneShot() {} diff --git a/src/sst/core/params.h b/src/sst/core/params.h index f525ce9bd..659a42b97 100644 --- a/src/sst/core/params.h +++ b/src/sst/core/params.h @@ -193,7 +193,7 @@ class Params : public SST::Core::Serialization::serializable } } - typedef std::map::const_iterator const_iterator; /*!< Const Iterator type */ + using const_iterator = std::map::const_iterator; /*!< Const Iterator type */ const std::string& getString(const std::string& name, bool& found) const; @@ -229,8 +229,8 @@ class Params : public SST::Core::Serialization::serializable void getDelimitedTokens(const std::string& value, char delim, std::vector& tokens) const; public: - typedef std::string key_type; /*!< Type of key (string) */ - typedef std::set KeySet_t; /*!< Type of a set of keys */ + using key_type = std::string; /*!< Type of key (string) */ + using KeySet_t = std::set; /*!< Type of a set of keys */ /** * Enable or disable parameter verification on an instance diff --git a/src/sst/core/profile.h b/src/sst/core/profile.h index 37ecadf0c..a7ec91d7c 100644 --- a/src/sst/core/profile.h +++ b/src/sst/core/profile.h @@ -26,7 +26,7 @@ namespace SST::Core::Profile { #define CLOCK std::chrono::steady_clock #endif -typedef CLOCK::time_point ProfData_t; +using ProfData_t = CLOCK::time_point; inline ProfData_t now() @@ -48,7 +48,7 @@ getElapsed(const ProfData_t& since) } #else -typedef double ProfData_t; +using ProfData_t = double; inline ProfData_t now() diff --git a/src/sst/core/serialization/impl/serialize_atomic.h b/src/sst/core/serialization/impl/serialize_atomic.h index 2ac7c93ea..081fe7377 100644 --- a/src/sst/core/serialization/impl/serialize_atomic.h +++ b/src/sst/core/serialization/impl/serialize_atomic.h @@ -26,7 +26,7 @@ namespace SST::Core::Serialization { template class serialize_impl> { - typedef std::atomic Value; + using Value = std::atomic; public: void operator()(Value& v, serializer& ser) diff --git a/src/sst/core/serialization/impl/serialize_deque.h b/src/sst/core/serialization/impl/serialize_deque.h index 3fa518255..665d18b50 100644 --- a/src/sst/core/serialization/impl/serialize_deque.h +++ b/src/sst/core/serialization/impl/serialize_deque.h @@ -26,7 +26,7 @@ namespace SST::Core::Serialization { template class serialize_impl> { - typedef std::deque Deque; + using Deque = std::deque; public: void operator()(Deque& v, serializer& ser) diff --git a/src/sst/core/serialization/impl/serialize_list.h b/src/sst/core/serialization/impl/serialize_list.h index 9faf2d93d..e12667f4f 100644 --- a/src/sst/core/serialization/impl/serialize_list.h +++ b/src/sst/core/serialization/impl/serialize_list.h @@ -26,12 +26,12 @@ namespace SST::Core::Serialization { template class serialize_impl> { - typedef std::list List; + using List = std::list; public: void operator()(List& v, serializer& ser) { - typedef typename List::iterator iterator; + using iterator = typename List::iterator; switch ( ser.mode() ) { case serializer::SIZER: { diff --git a/src/sst/core/serialization/impl/serialize_map.h b/src/sst/core/serialization/impl/serialize_map.h index bdcff0b18..d8476d165 100644 --- a/src/sst/core/serialization/impl/serialize_map.h +++ b/src/sst/core/serialization/impl/serialize_map.h @@ -32,12 +32,12 @@ namespace SST::Core::Serialization { template class serialize_impl> { - typedef std::map Map; + using Map = std::map; public: void operator()(Map& m, serializer& ser) { - typedef typename std::map::iterator iterator; + using iterator = typename std::map::iterator; switch ( ser.mode() ) { case serializer::SIZER: @@ -91,12 +91,12 @@ class serialize_impl> template class serialize> { - typedef std::unordered_map Map; + using Map = std::unordered_map; public: void operator()(Map& m, serializer& ser) { - typedef typename std::unordered_map::iterator iterator; + using iterator = typename std::unordered_map::iterator; switch ( ser.mode() ) { case serializer::SIZER: diff --git a/src/sst/core/serialization/impl/serialize_multiset.h b/src/sst/core/serialization/impl/serialize_multiset.h index 3b8ec672c..1fae9bc5b 100644 --- a/src/sst/core/serialization/impl/serialize_multiset.h +++ b/src/sst/core/serialization/impl/serialize_multiset.h @@ -27,12 +27,12 @@ namespace SST::Core::Serialization { template class serialize> { - typedef std::multiset MultiSet; + using MultiSet = std::multiset; public: void operator()(MultiSet& v, serializer& ser) { - typedef typename std::multiset::iterator iterator; + using iterator = typename std::multiset::iterator; switch ( ser.mode() ) { case serializer::SIZER: { @@ -82,12 +82,12 @@ class serialize> template class serialize> { - typedef std::unordered_multiset MultiSet; + using MultiSet = std::unordered_multiset; public: void operator()(MultiSet& v, serializer& ser) { - typedef typename std::unordered_multiset::iterator iterator; + using iterator = typename std::unordered_multiset::iterator; switch ( ser.mode() ) { case serializer::SIZER: { diff --git a/src/sst/core/serialization/impl/serialize_priority_queue.h b/src/sst/core/serialization/impl/serialize_priority_queue.h index b471372f9..5f3f2d186 100644 --- a/src/sst/core/serialization/impl/serialize_priority_queue.h +++ b/src/sst/core/serialization/impl/serialize_priority_queue.h @@ -26,7 +26,7 @@ namespace SST::Core::Serialization { template class serialize> { - typedef std::priority_queue Pqueue; + using Pqueue = std::priority_queue; public: S& getContainer(std::priority_queue& q) diff --git a/src/sst/core/serialization/impl/serialize_set.h b/src/sst/core/serialization/impl/serialize_set.h index c58cf0932..bdde60a14 100644 --- a/src/sst/core/serialization/impl/serialize_set.h +++ b/src/sst/core/serialization/impl/serialize_set.h @@ -27,12 +27,12 @@ namespace SST::Core::Serialization { template class serialize> { - typedef std::set Set; + using Set = std::set; public: void operator()(Set& v, serializer& ser) { - typedef typename std::set::iterator iterator; + using iterator = typename Set::iterator; switch ( ser.mode() ) { case serializer::SIZER: { @@ -82,12 +82,12 @@ class serialize> template class serialize> { - typedef std::unordered_set Set; + using Set = std::unordered_set; public: void operator()(Set& v, serializer& ser) { - typedef typename std::unordered_set::iterator iterator; + using iterator = typename Set::iterator; switch ( ser.mode() ) { case serializer::SIZER: { diff --git a/src/sst/core/serialization/impl/serialize_vector.h b/src/sst/core/serialization/impl/serialize_vector.h index c11bb244c..f46b1fde8 100644 --- a/src/sst/core/serialization/impl/serialize_vector.h +++ b/src/sst/core/serialization/impl/serialize_vector.h @@ -52,7 +52,7 @@ class serialize_impl> template friend class serialize; - typedef std::vector Vector; + using Vector = std::vector; void operator()(Vector& v, serializer& ser) { @@ -107,7 +107,7 @@ class serialize_impl> template friend class serialize; - typedef std::vector Vector; + using Vector = std::vector; void operator()(Vector& v, serializer& ser) { diff --git a/src/sst/core/serialization/serializable_base.h b/src/sst/core/serialization/serializable_base.h index e3dd10923..1193190c1 100644 --- a/src/sst/core/serialization/serializable_base.h +++ b/src/sst/core/serialization/serializable_base.h @@ -128,7 +128,7 @@ class serializable_base virtual ~serializable_base() {} protected: - typedef enum { ConstructorFlag } cxn_flag_t; + enum cxn_flag_t { ConstructorFlag }; static void serializable_abort(uint32_t line, const char* file, const char* func, const char* obj); }; @@ -241,8 +241,8 @@ class serializable_builder_impl : public serializable_builder class serializable_factory { protected: - typedef std::unordered_map builder_map; - static builder_map* builders_; + using builder_map = std::unordered_map; + static builder_map* builders_; public: static serializable_base* get_serializable(uint32_t cls_id); diff --git a/src/sst/core/serialization/statics.h b/src/sst/core/serialization/statics.h index 351426b8f..b6fc3fbf5 100644 --- a/src/sst/core/serialization/statics.h +++ b/src/sst/core/serialization/statics.h @@ -19,7 +19,7 @@ namespace SST::Core::Serialization { class statics { public: - typedef void (*clear_fxn)(void); + using clear_fxn = void (*)(void); static void register_finish(clear_fxn fxn); diff --git a/src/sst/core/shared/sharedArray.h b/src/sst/core/shared/sharedArray.h index 609e181c3..9c97c8f6b 100644 --- a/src/sst/core/shared/sharedArray.h +++ b/src/sst/core/shared/sharedArray.h @@ -102,8 +102,8 @@ class SharedArray : public SharedObject /*** Typedefs and functions to mimic parts of the vector API ***/ - typedef typename std::vector::const_iterator const_iterator; - typedef typename std::vector::const_reverse_iterator const_reverse_iterator; + using const_iterator = typename std::vector::const_iterator; + using const_reverse_iterator = typename std::vector::const_reverse_iterator; /** Get the length of the array. @@ -495,8 +495,8 @@ class SharedArray : public SharedObject /*** Typedefs and functions to mimic parts of the vector API ***/ - typedef typename std::vector::const_iterator const_iterator; - typedef typename std::vector::const_reverse_iterator const_reverse_iterator; + using const_iterator = typename std::vector::const_iterator; + using const_reverse_iterator = typename std::vector::const_reverse_iterator; /** Get the length of the array. diff --git a/src/sst/core/shared/sharedMap.h b/src/sst/core/shared/sharedMap.h index dcef0306d..6582d0b85 100644 --- a/src/sst/core/shared/sharedMap.h +++ b/src/sst/core/shared/sharedMap.h @@ -75,8 +75,8 @@ class SharedMap : public SharedObject } /*** Typedefs and functions to mimic parts of the vector API ***/ - typedef typename std::map::const_iterator const_iterator; - typedef typename std::map::const_reverse_iterator const_reverse_iterator; + using const_iterator = typename std::map::const_iterator; + using const_reverse_iterator = typename std::map::const_reverse_iterator; /** Get the size of the map. diff --git a/src/sst/core/shared/sharedSet.h b/src/sst/core/shared/sharedSet.h index ea4c1e661..bd703c16d 100644 --- a/src/sst/core/shared/sharedSet.h +++ b/src/sst/core/shared/sharedSet.h @@ -75,8 +75,8 @@ class SharedSet : public SharedObject } /*** Typedefs and functions to mimic parts of the vector API ***/ - typedef typename std::set::const_iterator const_iterator; - typedef typename std::set::const_reverse_iterator const_reverse_iterator; + using const_iterator = typename std::set::const_iterator; + using const_reverse_iterator = typename std::set::const_reverse_iterator; /** Get the size of the set. diff --git a/src/sst/core/simulation_impl.h b/src/sst/core/simulation_impl.h index ce0bf5737..5670040e2 100644 --- a/src/sst/core/simulation_impl.h +++ b/src/sst/core/simulation_impl.h @@ -131,8 +131,8 @@ class Simulation_impl /******** End Public API from Simulation ********/ - typedef std::map, Clock*> clockMap_t; /*!< Map of times to clocks */ - typedef std::map, OneShot*> oneShotMap_t; /*!< Map of times to OneShots */ + using clockMap_t = std::map, Clock*>; /*!< Map of times to clocks */ + using oneShotMap_t = std::map, OneShot*>; /*!< Map of times to OneShots */ ~Simulation_impl(); @@ -403,11 +403,11 @@ class Simulation_impl void endSimulation(); void endSimulation(SimTime_t end); - typedef enum { + enum ShutdownMode_t { SHUTDOWN_CLEAN, /* Normal shutdown */ SHUTDOWN_SIGNAL, /* SIGINT or SIGTERM received */ SHUTDOWN_EMERGENCY, /* emergencyShutdown() called */ - } ShutdownMode_t; + }; friend class SyncManager; diff --git a/src/sst/core/sparseVectorMap.h b/src/sst/core/sparseVectorMap.h index a2b0d9dcf..db4d1d45b 100644 --- a/src/sst/core/sparseVectorMap.h +++ b/src/sst/core/sparseVectorMap.h @@ -150,8 +150,8 @@ class SparseVectorMap } } - typedef typename std::vector::iterator iterator; - typedef typename std::vector::const_iterator const_iterator; + using iterator = typename std::vector::iterator; + using const_iterator = typename std::vector::const_iterator; /** Insert new value into SparseVectorMap. The inserted class must @@ -407,8 +407,8 @@ class SparseVectorMap } } - typedef typename std::vector::iterator iterator; - typedef typename std::vector::const_iterator const_iterator; + using iterator = typename std::vector::iterator; + using const_iterator = typename std::vector::const_iterator; /** Insert new value into SparseVectorMap. The inserted class must @@ -682,8 +682,8 @@ class SparseVectorMap } } - typedef typename std::vector::iterator iterator; - typedef typename std::vector::const_iterator const_iterator; + using iterator = typename std::vector::iterator; + using const_iterator = typename std::vector::const_iterator; /** Insert new value into SparseVectorMap. The inserted class must diff --git a/src/sst/core/sst_types.h b/src/sst/core/sst_types.h index d359d68c0..4b587a09f 100644 --- a/src/sst/core/sst_types.h +++ b/src/sst/core/sst_types.h @@ -17,13 +17,13 @@ namespace SST { -typedef uint64_t ComponentId_t; -typedef uint64_t StatisticId_t; -typedef uint32_t LinkId_t; -typedef uint64_t HandlerId_t; -typedef uint64_t Cycle_t; -typedef uint64_t SimTime_t; -typedef double Time_t; +using ComponentId_t = uint64_t; +using StatisticId_t = uint64_t; +using LinkId_t = uint32_t; +using HandlerId_t = uint64_t; +using Cycle_t = uint64_t; +using SimTime_t = uint64_t; +using Time_t = double; #define PRI_SIMTIME PRIu64 @@ -46,10 +46,10 @@ static constexpr StatisticId_t STATALL_ID = std::numeric_limits:: #define COMPDEFINED_SUBCOMPONENT_ID_CREATE(compId, sCompId) \ ((((uint64_t)sCompId) << COMPONENT_ID_BITS) | compId | 0x8000000000000000ULL) -typedef double watts; -typedef double joules; -typedef double farads; -typedef double volts; +using watts = double; +using joules = double; +using farads = double; +using volts = double; #ifndef LIKELY #define LIKELY(x) __builtin_expect((int)(x), 1) diff --git a/src/sst/core/ssthandler.h b/src/sst/core/ssthandler.h index af53a85e6..d1c0fdeab 100644 --- a/src/sst/core/ssthandler.h +++ b/src/sst/core/ssthandler.h @@ -1040,7 +1040,7 @@ template { private: - typedef returnT (classT::*PtrMember)(argT, dataT); + using PtrMember = returnT (classT::*)(argT, dataT); classT* object; const PtrMember member; dataT data; @@ -1071,7 +1071,7 @@ template class SSTHandler : public SSTHandlerBase { private: - typedef returnT (classT::*PtrMember)(argT); + using PtrMember = returnT (classT::*)(argT); const PtrMember member; classT* object; @@ -1096,7 +1096,7 @@ template class SSTHandlerNoArgs : public SSTHandlerBaseNoArgs { private: - typedef returnT (classT::*PtrMember)(dataT); + using PtrMember = returnT (classT::*)(dataT); classT* object; const PtrMember member; dataT data; @@ -1127,7 +1127,7 @@ template class SSTHandlerNoArgs : public SSTHandlerBaseNoArgs { private: - typedef returnT (classT::*PtrMember)(); + using PtrMember = returnT (classT::*)(); const PtrMember member; classT* object; diff --git a/src/sst/core/sstinfo.h b/src/sst/core/sstinfo.h index 405a54e55..87fba04fa 100644 --- a/src/sst/core/sstinfo.h +++ b/src/sst/core/sstinfo.h @@ -39,7 +39,7 @@ namespace SST { class SSTInfoConfig : public ConfigShared { public: - typedef std::multimap FilterMap_t; + using FilterMap_t = std::multimap; /** Create a new SSTInfo configuration and parse the Command Line. */ SSTInfoConfig(bool suppress_print); ~SSTInfoConfig(); diff --git a/src/sst/core/statapi/statbase.h b/src/sst/core/statapi/statbase.h index c253c4b4c..99e51cd1a 100644 --- a/src/sst/core/statapi/statbase.h +++ b/src/sst/core/statapi/statbase.h @@ -52,7 +52,7 @@ class StatisticBase * STAT_MODE_PERIODIC - generating statistic output on a periodic time basis * STAT_MODE_DUMP_AT_END - generating statistic output only at end of simulation */ - typedef enum { STAT_MODE_UNDEFINED, STAT_MODE_COUNT, STAT_MODE_PERIODIC, STAT_MODE_DUMP_AT_END } StatMode_t; + enum StatMode_t { STAT_MODE_UNDEFINED, STAT_MODE_COUNT, STAT_MODE_PERIODIC, STAT_MODE_DUMP_AT_END }; // Enable/Disable of Statistic /** Enable Statistic for collections */ diff --git a/src/sst/core/statapi/statengine.h b/src/sst/core/statapi/statengine.h index f0365aca5..bcb3cc624 100644 --- a/src/sst/core/statapi/statengine.h +++ b/src/sst/core/statapi/statengine.h @@ -135,9 +135,9 @@ class StatisticProcessingEngine : public SST::Core::Serialization::serializable void castError(const std::string& type, const std::string& statName, const std::string& fieldName); private: - typedef std::vector StatArray_t; /*!< Array of Statistics */ - typedef std::map StatMap_t; /*!< Map of simtimes to Statistic Arrays */ - typedef std::map CompStatMap_t; /*!< Map of ComponentId's to StatInfo Arrays */ + using StatArray_t = std::vector; /*!< Array of Statistics */ + using StatMap_t = std::map; /*!< Map of simtimes to Statistic Arrays */ + using CompStatMap_t = std::map; /*!< Map of ComponentId's to StatInfo Arrays */ StatArray_t m_EventStatisticArray; /*!< Array of Event Based Statistics */ StatMap_t m_PeriodicStatisticMap; /*!< Map of Array's of Periodic Based Statistics */ diff --git a/src/sst/core/statapi/stathistogram.h b/src/sst/core/statapi/stathistogram.h index b6ccf70be..8f3365175 100644 --- a/src/sst/core/statapi/stathistogram.h +++ b/src/sst/core/statapi/stathistogram.h @@ -329,10 +329,10 @@ class HistogramStatistic : public Statistic private: // Bin Map Definition - typedef std::map HistoMap_t; + using HistoMap_t = std::map; // Iterator over the histogram bins - typedef typename HistoMap_t::iterator HistoMapItr_t; + using HistoMapItr_t = typename HistoMap_t::iterator; // The minimum value in the Histogram BinDataType m_minValue; diff --git a/src/sst/core/statapi/statoutputhdf5.h b/src/sst/core/statapi/statoutputhdf5.h index 5d23d5db0..96d24f957 100644 --- a/src/sst/core/statapi/statoutputhdf5.h +++ b/src/sst/core/statapi/statoutputhdf5.h @@ -113,14 +113,14 @@ class StatisticOutputHDF5 : public StatisticFieldsOutput StatisticOutputHDF5(); // For serialization private: - typedef union { + union StatData_u { int32_t i32; uint32_t u32; int64_t i64; uint64_t u64; float f; double d; - } StatData_u; + }; class DataSet { diff --git a/src/sst/core/stringize.h b/src/sst/core/stringize.h index 123af950c..f3c195211 100644 --- a/src/sst/core/stringize.h +++ b/src/sst/core/stringize.h @@ -67,8 +67,8 @@ tokenize(std::vector& output, const std::string& input, const std:: struct char_delimiter { - typedef std::string::const_iterator iter; - const std::string delim; + using iter = std::string::const_iterator; + const std::string delim; char_delimiter(const std::string& delim = " \t\v\f\n\r") : delim(delim) {} /** @@ -89,10 +89,8 @@ struct char_delimiter struct escaped_list_separator { - typedef std::string::const_iterator iter; - std::string e; - std::string q; - std::string s; + using iter = std::string::const_iterator; + std::string e, q, s; escaped_list_separator( const std::string& esc = "\\", const std::string& sep = ",", const std::string& quote = "\"") : @@ -180,12 +178,12 @@ class Tokenizer using iterator_category = std::input_iterator_tag; }; - typedef token_iter iter; + using iter = token_iter; public: - typedef iter iterator; - typedef iter const_iterator; - typedef std::string value_type; + using iterator = iter; + using const_iterator = iter; + using value_type = std::string; iter begin() { return iter(f, first, last); } iter end() { return iter(f, last, last); } diff --git a/src/sst/core/sync/rankSyncParallelSkip.h b/src/sst/core/sync/rankSyncParallelSkip.h index 32d6fe8a0..b190f86f4 100644 --- a/src/sst/core/sync/rankSyncParallelSkip.h +++ b/src/sst/core/sync/rankSyncParallelSkip.h @@ -108,10 +108,10 @@ class RankSyncParallelSkip : public RankSync ImplementSerializable(comm_recv_pair) }; - typedef std::map comm_send_map_t; - typedef std::map comm_recv_map_t; - // typedef std::map link_map_t; - typedef std::map link_map_t; + using comm_send_map_t = std::map; + using comm_recv_map_t = std::map; + // using link_map_t = std::map; + using link_map_t = std::map; // TimeConverter* period; comm_send_map_t comm_send_map; diff --git a/src/sst/core/sync/rankSyncSerialSkip.h b/src/sst/core/sync/rankSyncSerialSkip.h index 89482b09b..bac04e0cb 100644 --- a/src/sst/core/sync/rankSyncSerialSkip.h +++ b/src/sst/core/sync/rankSyncSerialSkip.h @@ -71,8 +71,8 @@ class RankSyncSerialSkip : public RankSync ImplementSerializable(comm_pair) }; - typedef std::map comm_map_t; - typedef std::map link_map_t; + using comm_map_t = std::map; + using link_map_t = std::map; // TimeConverter* period; comm_map_t comm_map; diff --git a/src/sst/core/testElements/coreTest_ComponentEvent.h b/src/sst/core/testElements/coreTest_ComponentEvent.h index def992a28..cbb2ee30b 100644 --- a/src/sst/core/testElements/coreTest_ComponentEvent.h +++ b/src/sst/core/testElements/coreTest_ComponentEvent.h @@ -17,11 +17,10 @@ namespace SST::CoreTestComponent { class coreTestComponentEvent : public SST::Event { public: - typedef std::vector dataVec; + using dataVec = std::vector; coreTestComponentEvent() : SST::Event() {} dataVec payload; -public: void serialize_order(SST::Core::Serialization::serializer& ser) override { Event::serialize_order(ser); diff --git a/src/sst/core/threadsafe.h b/src/sst/core/threadsafe.h index 725366313..2cb34d540 100644 --- a/src/sst/core/threadsafe.h +++ b/src/sst/core/threadsafe.h @@ -114,7 +114,7 @@ class CACHE_ALIGNED_T Barrier }; #if 0 -typedef std::mutex Spinlock; +using Spinlock = std::mutex; #else class Spinlock { diff --git a/src/sst/core/timeLord.h b/src/sst/core/timeLord.h index df6e1c1e1..3d97709b0 100644 --- a/src/sst/core/timeLord.h +++ b/src/sst/core/timeLord.h @@ -36,8 +36,8 @@ class UnitAlgebra; */ class TimeLord { - typedef std::map TimeConverterMap_t; - typedef std::map StringToTCMap_t; + using TimeConverterMap_t = std::map; + using StringToTCMap_t = std::map; public: /** diff --git a/src/sst/core/unitAlgebra.h b/src/sst/core/unitAlgebra.h index 8e1feeb61..186fd27da 100644 --- a/src/sst/core/unitAlgebra.h +++ b/src/sst/core/unitAlgebra.h @@ -28,7 +28,7 @@ namespace SST { -typedef decimal_fixedpoint<3, 3> sst_big_num; +using sst_big_num = decimal_fixedpoint<3, 3>; /** * Helper class internal to UnitAlgebra. @@ -38,7 +38,7 @@ typedef decimal_fixedpoint<3, 3> sst_big_num; class Units { - typedef uint8_t unit_id_t; + using unit_id_t = uint8_t; private: friend class UnitAlgebra;