diff --git a/src/sst/core/baseComponent.h b/src/sst/core/baseComponent.h index fa075693d..335e7e9d3 100644 --- a/src/sst/core/baseComponent.h +++ b/src/sst/core/baseComponent.h @@ -1138,7 +1138,7 @@ class SerializeBaseComponentHelper template -class serialize_impl::value>::type> +class serialize_impl>> { template friend class serialize; diff --git a/src/sst/core/decimal_fixedpoint.h b/src/sst/core/decimal_fixedpoint.h index 3e8848864..95db5aff6 100644 --- a/src/sst/core/decimal_fixedpoint.h +++ b/src/sst/core/decimal_fixedpoint.h @@ -217,7 +217,7 @@ class decimal_fixedpoint @param init Initialization value. */ template - decimal_fixedpoint(T init, typename std::enable_if::value>::type* = nullptr) + decimal_fixedpoint(T init, std::enable_if_t>* = nullptr) { from_uint64(init); } @@ -228,8 +228,7 @@ class decimal_fixedpoint @param init Initialization value. */ template - decimal_fixedpoint( - T init, typename std::enable_if::value && std::is_integral::value>::type* = nullptr) + decimal_fixedpoint(T init, std::enable_if_t && std::is_integral_v>* = nullptr) { if ( init < 0 ) { from_uint64(-init); @@ -246,7 +245,7 @@ class decimal_fixedpoint @param init Initialization value. */ template - decimal_fixedpoint(const T init, typename std::enable_if::value>::type* = nullptr) + decimal_fixedpoint(const T init, std::enable_if_t>* = nullptr) { from_double(init); } @@ -408,7 +407,7 @@ class decimal_fixedpoint Templated conversion function for unsigned types. */ template - T convert_to(typename std::enable_if::value>::type* = 0) const + T convert_to(std::enable_if_t>* = nullptr) const { return static_cast(toUnsignedLong()); } @@ -417,7 +416,7 @@ class decimal_fixedpoint Templated conversion function for signed integral types. */ template - T convert_to(typename std::enable_if::value && std::is_integral::value>::type* = 0) const + T convert_to(std::enable_if_t && std::is_integral_v>* = nullptr) const { return static_cast(toLong()); } @@ -426,7 +425,7 @@ class decimal_fixedpoint Templated conversion function for floating point types. */ template - T convert_to(typename std::enable_if::value>::type* = 0) const + T convert_to(std::enable_if_t>* = nullptr) const { return static_cast(toDouble()); } diff --git a/src/sst/core/eli/attributeInfo.h b/src/sst/core/eli/attributeInfo.h index 0c476a15b..bde50f0cd 100644 --- a/src/sst/core/eli/attributeInfo.h +++ b/src/sst/core/eli/attributeInfo.h @@ -74,14 +74,14 @@ class ProvidesAttributes } // namespace SST // clang-format off -#define SST_ELI_DOCUMENT_ATTRIBUTES(...) \ - static const std::vector& ELI_getAttributes() \ - { \ - static std::vector var = { __VA_ARGS__ }; \ - auto parent = SST::ELI::GetAttributes< \ - typename std::conditional<(__EliDerivedLevel > __EliBaseLevel), __LocalEliBase, __ParentEliBase>::type>::get(); \ - SST::ELI::combineEliInfo(var, parent); \ - return var; \ +#define SST_ELI_DOCUMENT_ATTRIBUTES(...) \ + static const std::vector& ELI_getAttributes() \ + { \ + static std::vector var = { __VA_ARGS__ }; \ + auto parent = SST::ELI::GetAttributes< \ + std::conditional_t<(__EliDerivedLevel > __EliBaseLevel), __LocalEliBase, __ParentEliBase>>::get(); \ + SST::ELI::combineEliInfo(var, parent); \ + return var; \ } // clang-format on diff --git a/src/sst/core/eli/elementbuilder.h b/src/sst/core/eli/elementbuilder.h index c72e12b12..29cc97a95 100644 --- a/src/sst/core/eli/elementbuilder.h +++ b/src/sst/core/eli/elementbuilder.h @@ -184,13 +184,11 @@ struct DerivedBuilder : public Builder Base* create(Args... ctorArgs) override { return Allocator()(std::forward(ctorArgs)...); } }; -template -struct is_tuple_constructible : public std::false_type -{}; +template +inline constexpr bool is_tuple_constructible_v = false; template -struct is_tuple_constructible> : public std::is_constructible -{}; +inline constexpr bool is_tuple_constructible_v> = std::is_constructible_v; struct BuilderDatabase { @@ -230,7 +228,7 @@ template struct ExtendedCtor { template - using is_constructible = typename NewCtor::template is_constructible; + static constexpr bool is_constructible_v = NewCtor::template is_constructible_v; /** The derived Ctor can "block" the more abstract Ctor, meaning an object @@ -238,14 +236,14 @@ struct ExtendedCtor checks if both the derived API and the parent API are still valid */ template - static typename std::enable_if::value, bool>::type add() + static std::enable_if_t, bool> add() { // if abstract, force an allocation to generate meaningful errors return NewCtor::template add() && OldCtor::template add(); } template - static typename std::enable_if::value, bool>::type add() + static std::enable_if_t, bool> add() { // if abstract, force an allocation to generate meaningful errors return NewCtor::template add(); @@ -262,7 +260,7 @@ template struct SingleCtor { template - using is_constructible = std::is_constructible; + static constexpr bool is_constructible_v = std::is_constructible_v; template static bool add() @@ -283,15 +281,12 @@ template struct CtorList : public CtorList { template // if T is constructible with Ctor arguments - using is_constructible = typename std::conditional< - is_tuple_constructible::value, - std::true_type, // yes, constructible - typename CtorList::template is_constructible // not constructible here but maybe later - >::type; + static constexpr bool is_constructible_v = + is_tuple_constructible_v // yes, constructible + || CtorList::template is_constructible_v; // not constructible here but maybe later template - static typename std::enable_if::value || is_tuple_constructible::value, bool>::type - add() + static std::enable_if_t || is_tuple_constructible_v, bool> add() { // if abstract, force an allocation to generate meaningful errors auto* fact = ElementsBuilder::template makeBuilder(); @@ -300,8 +295,7 @@ struct CtorList : public CtorList } template - static typename std::enable_if::value && !is_tuple_constructible::value, bool>::type - add() + static std::enable_if_t && !is_tuple_constructible_v, bool> add() { return CtorList::template add(); } @@ -323,8 +317,8 @@ class NoValidConstructorsForDerivedType<0> template struct CtorList { - template - using is_constructible = std::false_type; + template + static constexpr bool is_constructible_v = false; template static bool add() diff --git a/src/sst/core/eli/elementinfo.h b/src/sst/core/eli/elementinfo.h index 34b203c68..71d846a71 100644 --- a/src/sst/core/eli/elementinfo.h +++ b/src/sst/core/eli/elementinfo.h @@ -420,15 +420,15 @@ SST_ELI_getTertiaryNumberFromVersion(SST_ELI_element_version_extraction ver) // this class. Sny local information will overwrite any inherited // information. See comment for SST_ELI_DECLARE_BASE in elibase.h for // info on how __EliDerivedLevel is used. -#define SST_ELI_REGISTER_DERIVED(base, cls, lib, name, version, desc) \ - [[maybe_unused]] static constexpr int __EliDerivedLevel = \ - std::is_same::value ? __EliBaseLevel : __EliBaseLevel + 1; \ - static bool ELI_isLoaded() \ - { \ - return SST::ELI::InstantiateBuilder::isLoaded() && \ - SST::ELI::InstantiateBuilderInfo::isLoaded(); \ - } \ - SST_ELI_FORCE_INSTANTIATION(base, cls) \ +#define SST_ELI_REGISTER_DERIVED(base, cls, lib, name, version, desc) \ + [[maybe_unused]] static constexpr int __EliDerivedLevel = \ + std::is_same_v ? __EliBaseLevel : __EliBaseLevel + 1; \ + static bool ELI_isLoaded() \ + { \ + return SST::ELI::InstantiateBuilder::isLoaded() && \ + SST::ELI::InstantiateBuilderInfo::isLoaded(); \ + } \ + SST_ELI_FORCE_INSTANTIATION(base, cls) \ SST_ELI_DEFAULT_INFO(lib, name, ELI_FORWARD_AS_ONE(version), desc) #define SST_ELI_REGISTER_EXTERN(base, cls) \ diff --git a/src/sst/core/eli/paramsInfo.h b/src/sst/core/eli/paramsInfo.h index 69e279ca6..f84100a3a 100644 --- a/src/sst/core/eli/paramsInfo.h +++ b/src/sst/core/eli/paramsInfo.h @@ -81,14 +81,14 @@ class ProvidesParams } // namespace SST // clang-format off -#define SST_ELI_DOCUMENT_PARAMS(...) \ - static const std::vector& ELI_getParams() \ - { \ - static std::vector var = { __VA_ARGS__ }; \ - auto parent = SST::ELI::GetParams< \ - typename std::conditional<(__EliDerivedLevel > __EliBaseLevel), __LocalEliBase, __ParentEliBase>::type>::get(); \ - SST::ELI::combineEliInfo(var, parent); \ - return var; \ +#define SST_ELI_DOCUMENT_PARAMS(...) \ + static const std::vector& ELI_getParams() \ + { \ + static std::vector var = { __VA_ARGS__ }; \ + auto parent = SST::ELI::GetParams< \ + std::conditional_t<(__EliDerivedLevel > __EliBaseLevel), __LocalEliBase, __ParentEliBase>>::get(); \ + SST::ELI::combineEliInfo(var, parent); \ + return var; \ } // clang-format on diff --git a/src/sst/core/eli/portsInfo.h b/src/sst/core/eli/portsInfo.h index cfca2b7ea..9e9b18214 100644 --- a/src/sst/core/eli/portsInfo.h +++ b/src/sst/core/eli/portsInfo.h @@ -77,14 +77,14 @@ class ProvidesPorts } // namespace SST // clang-format off -#define SST_ELI_DOCUMENT_PORTS(...) \ - static const std::vector& ELI_getPorts() \ - { \ - static std::vector var = { __VA_ARGS__ }; \ - auto parent = SST::ELI::InfoPorts< \ - typename std::conditional<(__EliDerivedLevel > __EliBaseLevel), __LocalEliBase, __ParentEliBase>::type>::get(); \ - SST::ELI::combineEliInfo(var, parent); \ - return var; \ +#define SST_ELI_DOCUMENT_PORTS(...) \ + static const std::vector& ELI_getPorts() \ + { \ + static std::vector var = { __VA_ARGS__ }; \ + auto parent = SST::ELI::InfoPorts< \ + std::conditional_t<(__EliDerivedLevel > __EliBaseLevel), __LocalEliBase, __ParentEliBase>>::get(); \ + SST::ELI::combineEliInfo(var, parent); \ + return var; \ } // clang-format on diff --git a/src/sst/core/eli/profilePointInfo.h b/src/sst/core/eli/profilePointInfo.h index 7980c1979..00a6ea400 100644 --- a/src/sst/core/eli/profilePointInfo.h +++ b/src/sst/core/eli/profilePointInfo.h @@ -71,14 +71,14 @@ class ProvidesProfilePoints } // namespace SST // clang-format off -#define SST_ELI_DOCUMENT_PROFILE_POINTS(...) \ - static const std::vector& ELI_getProfilePoints() \ - { \ - static std::vector var = { __VA_ARGS__ }; \ - auto parent = SST::ELI::InfoProfilePoints< \ - typename std::conditional<(__EliDerivedLevel > __EliBaseLevel), __LocalEliBase, __ParentEliBase>::type>::get(); \ - SST::ELI::combineEliInfo(var, parent); \ - return var; \ +#define SST_ELI_DOCUMENT_PROFILE_POINTS(...) \ + static const std::vector& ELI_getProfilePoints() \ + { \ + static std::vector var = { __VA_ARGS__ }; \ + auto parent = SST::ELI::InfoProfilePoints< \ + std::conditional_t<(__EliDerivedLevel > __EliBaseLevel), __LocalEliBase, __ParentEliBase>>::get(); \ + SST::ELI::combineEliInfo(var, parent); \ + return var; \ } // clang-format on #define SST_ELI_DELETE_PROFILE_POINT(point) \ diff --git a/src/sst/core/eli/simpleInfo.h b/src/sst/core/eli/simpleInfo.h index be46e4d18..32fba6690 100644 --- a/src/sst/core/eli/simpleInfo.h +++ b/src/sst/core/eli/simpleInfo.h @@ -54,17 +54,21 @@ class checkForELI_getSimpleInfoFunction static bool const value = (sizeof(HasFunction(0)) == sizeof(Match)); }; +template +inline constexpr bool checkForELI_getSimpleInfoFunction_v = + checkForELI_getSimpleInfoFunction::value; + // Actual functions that use checkForELI_getSimpleInfoFunction class // to create functions to get the information from the class template -typename std::enable_if::value, const InfoType&>::type +std::enable_if_t, const InfoType&> ELI_templatedGetSimpleInfo() { return T::ELI_getSimpleInfo(SimpleInfoPlaceHolder()); } template -typename std::enable_if::value, const InfoType&>::type +std::enable_if_t, const InfoType&> ELI_templatedGetSimpleInfo() { static InfoType var; diff --git a/src/sst/core/eli/statsInfo.h b/src/sst/core/eli/statsInfo.h index 0b57c1229..88818fb01 100644 --- a/src/sst/core/eli/statsInfo.h +++ b/src/sst/core/eli/statsInfo.h @@ -85,14 +85,14 @@ class ProvidesStats } // namespace SST // clang-format off -#define SST_ELI_DOCUMENT_STATISTICS(...) \ - static const std::vector& ELI_getStatistics() \ - { \ - static std::vector var = { __VA_ARGS__ }; \ - auto parent = SST::ELI::InfoStats< \ - typename std::conditional<(__EliDerivedLevel > __EliBaseLevel), __LocalEliBase, __ParentEliBase>::type>::get(); \ - SST::ELI::combineEliInfo(var, parent); \ - return var; \ +#define SST_ELI_DOCUMENT_STATISTICS(...) \ + static const std::vector& ELI_getStatistics() \ + { \ + static std::vector var = { __VA_ARGS__ }; \ + auto parent = SST::ELI::InfoStats< \ + std::conditional_t<(__EliDerivedLevel > __EliBaseLevel), __LocalEliBase, __ParentEliBase>>::get(); \ + SST::ELI::combineEliInfo(var, parent); \ + return var; \ } // clang-format on diff --git a/src/sst/core/eli/subcompSlotInfo.h b/src/sst/core/eli/subcompSlotInfo.h index a31e25309..9cccd8d9c 100644 --- a/src/sst/core/eli/subcompSlotInfo.h +++ b/src/sst/core/eli/subcompSlotInfo.h @@ -71,14 +71,14 @@ class ProvidesSubComponentSlots } // namespace SST // clang-format off -#define SST_ELI_DOCUMENT_SUBCOMPONENT_SLOTS(...) \ - static const std::vector& ELI_getSubComponentSlots() \ - { \ - static std::vector var = { __VA_ARGS__ }; \ - auto parent = SST::ELI::InfoSubs< \ - typename std::conditional<(__EliDerivedLevel > __EliBaseLevel), __LocalEliBase, __ParentEliBase>::type>::get(); \ - SST::ELI::combineEliInfo(var, parent); \ - return var; \ +#define SST_ELI_DOCUMENT_SUBCOMPONENT_SLOTS(...) \ + static const std::vector& ELI_getSubComponentSlots() \ + { \ + static std::vector var = { __VA_ARGS__ }; \ + auto parent = SST::ELI::InfoSubs< \ + std::conditional_t<(__EliDerivedLevel > __EliBaseLevel), __LocalEliBase, __ParentEliBase>>::get(); \ + SST::ELI::combineEliInfo(var, parent); \ + return var; \ } // clang-format on #define SST_ELI_DELETE_SUBCOMPONENT_SLOT(slot) \ diff --git a/src/sst/core/from_string.h b/src/sst/core/from_string.h index c4cab7a1c..2451052eb 100644 --- a/src/sst/core/from_string.h +++ b/src/sst/core/from_string.h @@ -20,15 +20,15 @@ namespace SST { namespace Core { template -typename std::enable_if::value, T>::type +std::enable_if_t, T> from_string(const std::string& input) { - if ( std::is_signed::value ) { - if ( std::is_same::value ) { return std::stoi(input, nullptr, 0); } - else if ( std::is_same::value ) { + if constexpr ( std::is_signed_v ) { + if constexpr ( std::is_same_v ) { return std::stoi(input, nullptr, 0); } + else if constexpr ( std::is_same_v ) { return std::stol(input, nullptr, 0); } - else if ( std::is_same::value ) { + else if constexpr ( std::is_same_v ) { return std::stoll(input, nullptr, 0); } else { // Smaller than 32-bit @@ -36,7 +36,7 @@ from_string(const std::string& input) } } else { - if ( std::is_same::value ) { + if constexpr ( std::is_same_v ) { // valid pairs: true/false, t/f, yes/no, y/n, on/off, 1/0 std::string transform(input); for ( auto& c : transform ) @@ -54,10 +54,10 @@ from_string(const std::string& input) throw std::invalid_argument("from_string: no valid conversion"); } } - else if ( std::is_same::value ) { + else if constexpr ( std::is_same_v ) { return std::stoul(input, nullptr, 0); } - else if ( std::is_same::value ) { + else if constexpr ( std::is_same_v ) { return std::stoull(input, nullptr, 0); } else { // Smaller than 32-bit @@ -67,14 +67,14 @@ from_string(const std::string& input) } template -typename std::enable_if::value, T>::type +std::enable_if_t, T> from_string(const std::string& input) { - if ( std::is_same::value ) { return stof(input); } - else if ( std::is_same::value ) { + if constexpr ( std::is_same_v ) { return stof(input); } + else if constexpr ( std::is_same_v ) { return stod(input); } - else if ( std::is_same::value ) { + else if constexpr ( std::is_same_v ) { return stold(input); } else { // make compiler happy @@ -83,11 +83,11 @@ from_string(const std::string& input) } template -typename std::enable_if::value, T>::type +std::enable_if_t, T> from_string(const std::string& input) { static_assert( - std::is_constructible::value, + std::is_constructible_v, "ERROR: from_string can only be used with integral and floating point types and with classes that have a " "constructor that takes a single string as input.\n"); return T(input); diff --git a/src/sst/core/impl/timevortex/timeVortexBinnedMap.h b/src/sst/core/impl/timevortex/timeVortexBinnedMap.h index 97802613f..dbdfc947f 100644 --- a/src/sst/core/impl/timevortex/timeVortexBinnedMap.h +++ b/src/sst/core/impl/timevortex/timeVortexBinnedMap.h @@ -153,10 +153,9 @@ class TimeVortexBinnedMapBase : public TimeVortex typedef std::map mapType_t; // Accessed by multiple threads, must be locked when accessing - mapType_t map; - typename std::conditional, uint64_t>::type insertOrder; - - typename std::conditional, uint64_t>::type current_depth; + mapType_t map; + std::conditional_t, uint64_t> insertOrder; + std::conditional_t, uint64_t> current_depth; // Should only ever be accessed by the "active" thread, or in a // mutex. There are no internal mutexes. diff --git a/src/sst/core/impl/timevortex/timeVortexPQ.h b/src/sst/core/impl/timevortex/timeVortexPQ.h index aa0a499cc..dbe02a40d 100644 --- a/src/sst/core/impl/timevortex/timeVortexPQ.h +++ b/src/sst/core/impl/timevortex/timeVortexPQ.h @@ -79,7 +79,7 @@ class TimeVortexPQBase : public TimeVortex uint64_t max_depth; // Need current depth to be atomic if we are thread safe - typename std::conditional, uint64_t>::type current_depth; + std::conditional_t, uint64_t> current_depth; CACHE_ALIGNED(SST::Core::ThreadSafe::Spinlock, slock); }; diff --git a/src/sst/core/params.h b/src/sst/core/params.h index ba968deaa..f525ce9bd 100644 --- a/src/sst/core/params.h +++ b/src/sst/core/params.h @@ -317,8 +317,7 @@ class Params : public SST::Core::Serialization::serializable * converted to type T, an invalid_argument exception is thrown. */ template - typename std::enable_if::value, T>::type - find(const std::string& k, T default_value, bool& found) const + std::enable_if_t, T> find(const std::string& k, T default_value, bool& found) const { return find_impl(k, default_value, found); } @@ -350,7 +349,7 @@ class Params : public SST::Core::Serialization::serializable * specified as a string literal */ template - typename std::enable_if::value, T>::type + std::enable_if_t, T> find(const std::string& k, const char* default_value, bool& found) const { if ( nullptr == default_value ) { return find_impl(k, static_cast(0), found); } @@ -399,8 +398,7 @@ class Params : public SST::Core::Serialization::serializable * specified as a string literal */ template - typename std::enable_if::value, T>::type - find(const std::string& k, const char* default_value) const + std::enable_if_t, T> find(const std::string& k, const char* default_value) const { bool tmp; if ( nullptr == default_value ) { return find_impl(k, static_cast(0), tmp); } @@ -433,7 +431,7 @@ class Params : public SST::Core::Serialization::serializable * @param found - set to true if the the parameter was found */ template - typename std::enable_if::value, T>::type find(const std::string& k, bool& found) const + std::enable_if_t, T> find(const std::string& k, bool& found) const { T default_value = T(); return find_impl(k, default_value, found); diff --git a/src/sst/core/serialization/impl/serialize_array.h b/src/sst/core/serialization/impl/serialize_array.h index e3292c071..7217b6746 100644 --- a/src/sst/core/serialization/impl/serialize_array.h +++ b/src/sst/core/serialization/impl/serialize_array.h @@ -84,7 +84,7 @@ raw_ptr(TPtr*& ptr) fundamental types and enums. */ template -class serialize_impl::value || std::is_enum::value>::type> +class serialize_impl || std::is_enum_v>> { template friend class serialize; @@ -101,7 +101,7 @@ class serialize_impl::value non base types. */ template -class serialize_impl::value && !std::is_enum::value>::type> +class serialize_impl && !std::is_enum_v>> { template friend class serialize; @@ -126,8 +126,7 @@ class serialize_impl::valu */ template class serialize_impl< - pvt::ser_array_wrapper, - typename std::enable_if::value || std::is_enum::value>::type> + pvt::ser_array_wrapper, std::enable_if_t || std::is_enum_v>> { template friend class serialize; @@ -145,8 +144,7 @@ class serialize_impl< */ template class serialize_impl< - pvt::ser_array_wrapper, - typename std::enable_if::value && !std::is_enum::value>::type> + pvt::ser_array_wrapper, std::enable_if_t && !std::is_enum_v>> { template friend class serialize; diff --git a/src/sst/core/serialization/serializable.h b/src/sst/core/serialization/serializable.h index 07a9c9d22..9a8b7ebc7 100644 --- a/src/sst/core/serialization/serializable.h +++ b/src/sst/core/serialization/serializable.h @@ -50,8 +50,7 @@ void map_serializable(serializable_base*& s, serializer& ser, const char* name); template -class serialize_impl< - T*, typename std::enable_if::value>::type> +class serialize_impl>> { template @@ -120,8 +119,7 @@ serialize_intrusive_ptr(T*& t, serializer& ser) } template -class serialize_impl< - T, typename std::enable_if::value>::type> +class serialize_impl>> { template friend class serialize; diff --git a/src/sst/core/serialization/serialize.h b/src/sst/core/serialization/serialize.h index 72d9c10d4..854107973 100644 --- a/src/sst/core/serialization/serialize.h +++ b/src/sst/core/serialization/serialize.h @@ -29,8 +29,8 @@ namespace Serialization { // Workaround for use with static_assert(), since static_assert(false) // will always assert, even when in an untaken if constexpr path. // This can be used in any serialize_impl class, if needed/ -template -constexpr bool dependent_false = false; +template +inline constexpr bool dependent_false = false; /** Base serialize class. @@ -52,10 +52,9 @@ class serialize_impl // If it falls through to the default, let's check to see if it's // a non-polymorphic class and try to call serialize_order if constexpr ( - std::is_class_v::type> && - !std::is_polymorphic_v::type> ) { + std::is_class_v> && !std::is_polymorphic_v> ) { if ( ser.mode() == serializer::UNPACK ) { - t = new typename std::remove_pointer::type(); + t = new std::remove_pointer_t(); ser.report_new_pointer(reinterpret_cast(t)); } t->serialize_order(ser); @@ -81,10 +80,9 @@ class serialize_impl // If it falls through to the default, let's check to see if it's // a non-polymorphic class and try to call serialize_order if constexpr ( - std::is_class_v::type> && - !std::is_polymorphic_v::type> ) { + std::is_class_v> && !std::is_polymorphic_v> ) { if ( ser.mode() == serializer::UNPACK ) { - t = new typename std::remove_pointer::type(); + t = new std::remove_pointer_t(); ser.report_new_pointer(reinterpret_cast(t)); } if ( ser.mode() == serializer::MAP ) { @@ -327,7 +325,7 @@ class serialize */ template -class serialize_impl::value || std::is_enum::value>::type> +class serialize_impl || std::is_enum_v>> { template friend class serialize; @@ -371,7 +369,7 @@ class serialize_impl independent copy after deserialization. */ template -class serialize_impl::value || std::is_enum::value>::type> +class serialize_impl || std::is_enum_v>> { template friend class serialize; @@ -416,7 +414,7 @@ class serialize_impl> // a serialize_order function // */ // template -// class serialize_impl::value && !std::is_polymorphic::value>::type> +// class serialize_impl && !std::is_polymorphic_v>> // { // template // friend class serialize; diff --git a/src/sst/core/shared/sharedArray.h b/src/sst/core/shared/sharedArray.h index 9e8a022b6..1b61b0650 100644 --- a/src/sst/core/shared/sharedArray.h +++ b/src/sst/core/shared/sharedArray.h @@ -28,7 +28,7 @@ namespace Shared { template class SharedArray : public SharedObject { - static_assert(!std::is_pointer::value, "Cannot use a pointer type with SharedArray"); + static_assert(!std::is_pointer_v, "Cannot use a pointer type with SharedArray"); // Forward declaration. Defined below class Data; diff --git a/src/sst/core/shared/sharedMap.h b/src/sst/core/shared/sharedMap.h index f450df7ca..f86a5a840 100644 --- a/src/sst/core/shared/sharedMap.h +++ b/src/sst/core/shared/sharedMap.h @@ -27,7 +27,7 @@ namespace Shared { template class SharedMap : public SharedObject { - static_assert(!std::is_pointer::value, "Cannot use a pointer type as value with SharedMap"); + static_assert(!std::is_pointer_v, "Cannot use a pointer type as value with SharedMap"); // Forward declaration. Defined below class Data; diff --git a/src/sst/core/shared/sharedSet.h b/src/sst/core/shared/sharedSet.h index 70b104d95..66cea07da 100644 --- a/src/sst/core/shared/sharedSet.h +++ b/src/sst/core/shared/sharedSet.h @@ -27,7 +27,7 @@ namespace Shared { template class SharedSet : public SharedObject { - static_assert(!std::is_pointer::value, "Cannot use a pointer type as value with SharedSet"); + static_assert(!std::is_pointer_v, "Cannot use a pointer type as value with SharedSet"); // Forward declaration. Defined below class Data; diff --git a/src/sst/core/ssthandler.h b/src/sst/core/ssthandler.h index e0c88c3df..af53a85e6 100644 --- a/src/sst/core/ssthandler.h +++ b/src/sst/core/ssthandler.h @@ -1161,12 +1161,8 @@ class SSTHandlerNoArgs : public SSTHandlerBaseNoArgs class SSTHandler2 : public SSTHandlerBase { - - // This has to be dependent on a template, otherwise it always - // assers. Need to make sure it covers both cases to assert - // if this template is expanded. - static_assert(std::is_fundamental::value, "Mismatched handler templates."); - static_assert(!std::is_fundamental::value, "Mismatched handler templates."); + // This has to be dependent on a template parameter, otherwise it always asserts. + static_assert((funcT, false), "Mismatched handler templates."); }; diff --git a/src/sst/core/statapi/statbase.h b/src/sst/core/statapi/statbase.h index 9216eab37..5ebfa18c2 100644 --- a/src/sst/core/statapi/statbase.h +++ b/src/sst/core/statapi/statbase.h @@ -286,7 +286,7 @@ class StatisticBase * Used for distinguishing fundamental types (collected by value) * and composite struct types (collected by reference) */ -template ::value> +template > struct StatisticCollector {}; diff --git a/src/sst/core/statapi/statnull.h b/src/sst/core/statapi/statnull.h index 48baa7f9d..cd6537fd8 100644 --- a/src/sst/core/statapi/statnull.h +++ b/src/sst/core/statapi/statnull.h @@ -35,7 +35,7 @@ namespace Statistics { @tparam T A template for holding the main data type of this statistic */ -template ::value> +template > struct NullStatisticBase {};