lib/dbus/Values: use using instead of typedef

This commit is contained in:
Max Kellermann 2020-07-23 16:23:43 +02:00
parent 5e1a2e2a93
commit bdfe6c2c45

View File

@ -57,7 +57,7 @@ struct String : BasicValue<const char *> {
}; };
struct Boolean { struct Boolean {
typedef BooleanTypeTraits Traits; using Traits = BooleanTypeTraits;
dbus_bool_t value; dbus_bool_t value;
explicit constexpr Boolean(bool _value) noexcept explicit constexpr Boolean(bool _value) noexcept
@ -69,8 +69,8 @@ using Uint64 = BasicValue<dbus_uint64_t>;
template<typename T, template<typename U> class WrapTraits> template<typename T, template<typename U> class WrapTraits>
struct WrapValue { struct WrapValue {
typedef typename T::Traits ContainedTraits; using ContainedTraits = typename T::Traits;
typedef WrapTraits<ContainedTraits> Traits; using Traits = WrapTraits<ContainedTraits>;
const T &value; const T &value;
explicit constexpr WrapValue(const T &_value) noexcept explicit constexpr WrapValue(const T &_value) noexcept
@ -79,8 +79,8 @@ struct WrapValue {
template<typename T> template<typename T>
struct WrapVariant : BasicValue<T> { struct WrapVariant : BasicValue<T> {
typedef typename T::Traits ContainedTraits; using ContainedTraits = typename T::Traits;
typedef VariantTypeTraits Traits; using Traits = VariantTypeTraits;
explicit constexpr WrapVariant(const T &_value) noexcept explicit constexpr WrapVariant(const T &_value) noexcept
:BasicValue<T>(_value) {} :BasicValue<T>(_value) {}
@ -93,8 +93,8 @@ static WrapVariant<T> Variant(const T &_value) noexcept {
template<typename T> template<typename T>
struct WrapFixedArray { struct WrapFixedArray {
typedef TypeTraits<T> ContainedTraits; using ContainedTraits = TypeTraits<T>;
typedef ArrayTypeTraits<ContainedTraits> Traits; using Traits = ArrayTypeTraits<ContainedTraits>;
ConstBuffer<T> value; ConstBuffer<T> value;
explicit constexpr WrapFixedArray(const T *_data, explicit constexpr WrapFixedArray(const T *_data,
@ -110,7 +110,7 @@ static WrapFixedArray<T> FixedArray(const T *_data,
template<typename... T> template<typename... T>
struct WrapStruct { struct WrapStruct {
typedef StructTypeTraits<T...> Traits; using Traits = StructTypeTraits<T...>;
std::tuple<const T&...> values; std::tuple<const T&...> values;