Skip to content

Commit a799415

Browse files
committedMar 17, 2025··
Merge bitcoin#31904: refactor: modernize outdated trait patterns using helper aliases (C++14/C++17)
4cd95a2 refactor: modernize remaining outdated trait patterns (Lőrinc) ab2b67f scripted-diff: modernize outdated trait patterns - values (Lőrinc) 8327889 scripted-diff: modernize outdated trait patterns - types (Lőrinc) Pull request description: The use of [`std::underlying_type_t<T>`](https://en.cppreference.com/w/cpp/types/underlying_type) or [`std::is_enum_v<T>`](https://en.cppreference.com/w/cpp/types/is_enum) (and similar ones, introduced in C++14) replace the `typename std::underlying_type<T>::type` and `std::is_enum<T>::value` constructs (available in C++11). The `_t` and `_v` helper alias templates offer a more concise way to extract the type and value directly. I've modified the instances I found in the codebase one-by-one (noticed them while investigating bitcoin#31868), and afterwards extracted scripted diff commits to do the trivial ones automatically. The last commit contains the values that were easier done manually. I've excluded changes from `src/bench/nanobench.h`, `src/leveldb`, `src/minisketch`, `src/span.h` and `src/sync.h` - let me know if you think they should be included instead. A few of the code changes can also be reproduced by clang-tidy (but not all of them): ```bash cmake -B build -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DBUILD_BENCH=ON -DBUILD_FUZZ_BINARY=ON -DBUILD_FOR_FUZZING=ON && cmake --build build -j$(nproc) run-clang-tidy -quiet -p build -j $(nproc) -checks='-*,modernize-type-traits' -fix $(git grep -lE '::(value|type)' ./src ':(exclude)src/bench/nanobench.h' ':(exclude)src/leveldb' ':(exclude)src/minisketch' ':(exclude)src/span.h' ':(exclude)src/sync.h') ``` ACKs for top commit: laanwj: Concept and code review ACK 4cd95a2 Tree-SHA512: a4bcf0f267c0f4e02983b4d548ed6f58d464ec379ac5cd1f998b9ec0cf698b53a9f2557a05a342b661f1d94adefc9a0ce2dc8f764d49453aaea95451e2c4c581
2 parents 5f4422d + 4cd95a2 commit a799415

21 files changed

+47
-47
lines changed
 

‎src/bench/prevector.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ struct nontrivial_t {
1616
nontrivial_t() = default;
1717
SERIALIZE_METHODS(nontrivial_t, obj) { READWRITE(obj.x); }
1818
};
19-
static_assert(!std::is_trivially_default_constructible<nontrivial_t>::value,
19+
static_assert(!std::is_trivially_default_constructible_v<nontrivial_t>,
2020
"expected nontrivial_t to not be trivially constructible");
2121

2222
typedef unsigned char trivial_t;
23-
static_assert(std::is_trivially_default_constructible<trivial_t>::value,
23+
static_assert(std::is_trivially_default_constructible_v<trivial_t>,
2424
"expected trivial_t to be trivially constructible");
2525

2626
template <typename T>

‎src/deploymentstatus.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ static_assert(!ValidDeployment(static_cast<Consensus::BuriedDeployment>(Consensu
2424
template<typename T, T x>
2525
static constexpr bool is_minimum()
2626
{
27-
using U = typename std::underlying_type<T>::type;
27+
using U = std::underlying_type_t<T>;
2828
return x == std::numeric_limits<U>::min();
2929
}
3030

‎src/interfaces/wallet.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ enum class AddressPurpose;
4545
enum isminetype : unsigned int;
4646
struct CRecipient;
4747
struct WalletContext;
48-
using isminefilter = std::underlying_type<isminetype>::type;
48+
using isminefilter = std::underlying_type_t<isminetype>;
4949
} // namespace wallet
5050

5151
namespace interfaces {

‎src/logging/timer.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,11 @@ class Timer
6767
}
6868
const auto duration{end_time - *m_start_t};
6969

70-
if constexpr (std::is_same<TimeType, std::chrono::microseconds>::value) {
70+
if constexpr (std::is_same_v<TimeType, std::chrono::microseconds>) {
7171
return strprintf("%s: %s (%iμs)", m_prefix, msg, Ticks<std::chrono::microseconds>(duration));
72-
} else if constexpr (std::is_same<TimeType, std::chrono::milliseconds>::value) {
72+
} else if constexpr (std::is_same_v<TimeType, std::chrono::milliseconds>) {
7373
return strprintf("%s: %s (%.2fms)", m_prefix, msg, Ticks<MillisecondsDouble>(duration));
74-
} else if constexpr (std::is_same<TimeType, std::chrono::seconds>::value) {
74+
} else if constexpr (std::is_same_v<TimeType, std::chrono::seconds>) {
7575
return strprintf("%s: %s (%.2fs)", m_prefix, msg, Ticks<SecondsDouble>(duration));
7676
} else {
7777
static_assert(ALWAYS_FALSE<TimeType>, "Error: unexpected time type");

‎src/net_permissions.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ enum class NetPermissionFlags : uint32_t {
4848
};
4949
static inline constexpr NetPermissionFlags operator|(NetPermissionFlags a, NetPermissionFlags b)
5050
{
51-
using t = typename std::underlying_type<NetPermissionFlags>::type;
51+
using t = std::underlying_type_t<NetPermissionFlags>;
5252
return static_cast<NetPermissionFlags>(static_cast<t>(a) | static_cast<t>(b));
5353
}
5454

@@ -59,7 +59,7 @@ class NetPermissions
5959
static std::vector<std::string> ToStrings(NetPermissionFlags flags);
6060
static inline bool HasFlag(NetPermissionFlags flags, NetPermissionFlags f)
6161
{
62-
using t = typename std::underlying_type<NetPermissionFlags>::type;
62+
using t = std::underlying_type_t<NetPermissionFlags>;
6363
return (static_cast<t>(flags) & static_cast<t>(f)) == static_cast<t>(f);
6464
}
6565
static inline void AddFlag(NetPermissionFlags& flags, NetPermissionFlags f)
@@ -74,7 +74,7 @@ class NetPermissions
7474
static inline void ClearFlag(NetPermissionFlags& flags, NetPermissionFlags f)
7575
{
7676
assert(f == NetPermissionFlags::Implicit);
77-
using t = typename std::underlying_type<NetPermissionFlags>::type;
77+
using t = std::underlying_type_t<NetPermissionFlags>;
7878
flags = static_cast<NetPermissionFlags>(static_cast<t>(flags) & ~static_cast<t>(f));
7979
}
8080
};

‎src/netbase.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,12 @@ enum class ConnectionDirection {
3737
Both = (In | Out),
3838
};
3939
static inline ConnectionDirection& operator|=(ConnectionDirection& a, ConnectionDirection b) {
40-
using underlying = typename std::underlying_type<ConnectionDirection>::type;
40+
using underlying = std::underlying_type_t<ConnectionDirection>;
4141
a = ConnectionDirection(underlying(a) | underlying(b));
4242
return a;
4343
}
4444
static inline bool operator&(ConnectionDirection a, ConnectionDirection b) {
45-
using underlying = typename std::underlying_type<ConnectionDirection>::type;
45+
using underlying = std::underlying_type_t<ConnectionDirection>;
4646
return (underlying(a) & underlying(b));
4747
}
4848

‎src/random.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ class RandomMixin
334334

335335
/** Generate a uniform random duration in the range [0..max). Precondition: max.count() > 0 */
336336
template <StdChronoDuration Dur>
337-
Dur randrange(typename std::common_type_t<Dur> range) noexcept
337+
Dur randrange(std::common_type_t<Dur> range) noexcept
338338
// Having the compiler infer the template argument from the function argument
339339
// is dangerous, because the desired return value generally has a different
340340
// type than the function argument. So std::common_type is used to force the

‎src/randomenv.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,10 @@ namespace {
7070
*/
7171
template<typename T>
7272
CSHA512& operator<<(CSHA512& hasher, const T& data) {
73-
static_assert(!std::is_same<typename std::decay<T>::type, char*>::value, "Calling operator<<(CSHA512, char*) is probably not what you want");
74-
static_assert(!std::is_same<typename std::decay<T>::type, unsigned char*>::value, "Calling operator<<(CSHA512, unsigned char*) is probably not what you want");
75-
static_assert(!std::is_same<typename std::decay<T>::type, const char*>::value, "Calling operator<<(CSHA512, const char*) is probably not what you want");
76-
static_assert(!std::is_same<typename std::decay<T>::type, const unsigned char*>::value, "Calling operator<<(CSHA512, const unsigned char*) is probably not what you want");
73+
static_assert(!std::is_same_v<std::decay_t<T>, char*>, "Calling operator<<(CSHA512, char*) is probably not what you want");
74+
static_assert(!std::is_same_v<std::decay_t<T>, unsigned char*>, "Calling operator<<(CSHA512, unsigned char*) is probably not what you want");
75+
static_assert(!std::is_same_v<std::decay_t<T>, const char*>, "Calling operator<<(CSHA512, const char*) is probably not what you want");
76+
static_assert(!std::is_same_v<std::decay_t<T>, const unsigned char*>, "Calling operator<<(CSHA512, const unsigned char*) is probably not what you want");
7777
hasher.Write((const unsigned char*)&data, sizeof(data));
7878
return hasher;
7979
}

‎src/rpc/util.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ const std::string EXAMPLE_ADDRESS[2] = {"bc1q09vm5lfy0j5reeulh4x5752q25uqqvz34hu
4949
std::string GetAllOutputTypes()
5050
{
5151
std::vector<std::string> ret;
52-
using U = std::underlying_type<TxoutType>::type;
52+
using U = std::underlying_type_t<TxoutType>;
5353
for (U i = (U)TxoutType::NONSTANDARD; i <= (U)TxoutType::WITNESS_UNKNOWN; ++i) {
5454
ret.emplace_back(GetTxnOutputType(static_cast<TxoutType>(i)));
5555
}

‎src/serialize.h

+10-10
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ const Out& AsBase(const In& x)
154154
}
155155

156156
#define READWRITE(...) (ser_action.SerReadWriteMany(s, __VA_ARGS__))
157-
#define SER_READ(obj, code) ser_action.SerRead(s, obj, [&](Stream& s, typename std::remove_const<Type>::type& obj) { code; })
157+
#define SER_READ(obj, code) ser_action.SerRead(s, obj, [&](Stream& s, std::remove_const_t<Type>& obj) { code; })
158158
#define SER_WRITE(obj, code) ser_action.SerWrite(s, obj, [&](Stream& s, const Type& obj) { code; })
159159

160160
/**
@@ -220,13 +220,13 @@ const Out& AsBase(const In& x)
220220
template <typename Stream> \
221221
void Serialize(Stream& s) const \
222222
{ \
223-
static_assert(std::is_same<const cls&, decltype(*this)>::value, "Serialize type mismatch"); \
223+
static_assert(std::is_same_v<const cls&, decltype(*this)>, "Serialize type mismatch"); \
224224
Ser(s, *this); \
225225
} \
226226
template <typename Stream> \
227227
void Unserialize(Stream& s) \
228228
{ \
229-
static_assert(std::is_same<cls&, decltype(*this)>::value, "Unserialize type mismatch"); \
229+
static_assert(std::is_same_v<cls&, decltype(*this)>, "Unserialize type mismatch"); \
230230
Unser(s, *this); \
231231
}
232232

@@ -408,8 +408,8 @@ template <VarIntMode Mode, typename I>
408408
struct CheckVarIntMode {
409409
constexpr CheckVarIntMode()
410410
{
411-
static_assert(Mode != VarIntMode::DEFAULT || std::is_unsigned<I>::value, "Unsigned type required with mode DEFAULT.");
412-
static_assert(Mode != VarIntMode::NONNEGATIVE_SIGNED || std::is_signed<I>::value, "Signed type required with mode NONNEGATIVE_SIGNED.");
411+
static_assert(Mode != VarIntMode::DEFAULT || std::is_unsigned_v<I>, "Unsigned type required with mode DEFAULT.");
412+
static_assert(Mode != VarIntMode::NONNEGATIVE_SIGNED || std::is_signed_v<I>, "Signed type required with mode NONNEGATIVE_SIGNED.");
413413
}
414414
};
415415

@@ -474,7 +474,7 @@ I ReadVarInt(Stream& is)
474474
template<typename Formatter, typename T>
475475
class Wrapper
476476
{
477-
static_assert(std::is_lvalue_reference<T>::value, "Wrapper needs an lvalue reference type T");
477+
static_assert(std::is_lvalue_reference_v<T>, "Wrapper needs an lvalue reference type T");
478478
protected:
479479
T m_object;
480480
public:
@@ -507,12 +507,12 @@ struct VarIntFormatter
507507
{
508508
template<typename Stream, typename I> void Ser(Stream &s, I v)
509509
{
510-
WriteVarInt<Stream,Mode,typename std::remove_cv<I>::type>(s, v);
510+
WriteVarInt<Stream,Mode, std::remove_cv_t<I>>(s, v);
511511
}
512512

513513
template<typename Stream, typename I> void Unser(Stream& s, I& v)
514514
{
515-
v = ReadVarInt<Stream,Mode,typename std::remove_cv<I>::type>(s);
515+
v = ReadVarInt<Stream,Mode, std::remove_cv_t<I>>(s);
516516
}
517517
};
518518

@@ -545,7 +545,7 @@ struct CustomUintFormatter
545545

546546
template <typename Stream, typename I> void Unser(Stream& s, I& v)
547547
{
548-
using U = typename std::conditional<std::is_enum<I>::value, std::underlying_type<I>, std::common_type<I>>::type::type;
548+
using U = typename std::conditional_t<std::is_enum_v<I>, std::underlying_type<I>, std::common_type<I>>::type;
549549
static_assert(std::numeric_limits<U>::max() >= MAX && std::numeric_limits<U>::min() <= 0, "Assigned type too small");
550550
uint64_t raw = 0;
551551
if (BigEndian) {
@@ -577,7 +577,7 @@ struct CompactSizeFormatter
577577
template<typename Stream, typename I>
578578
void Ser(Stream& s, I v)
579579
{
580-
static_assert(std::is_unsigned<I>::value, "CompactSize only supported for unsigned integers");
580+
static_assert(std::is_unsigned_v<I>, "CompactSize only supported for unsigned integers");
581581
static_assert(std::numeric_limits<I>::max() <= std::numeric_limits<uint64_t>::max(), "CompactSize only supports 64-bit integers and below");
582582

583583
WriteCompactSize<Stream>(s, v);

‎src/sync.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,8 @@ template <typename MutexType>
148148
static void push_lock(MutexType* c, const CLockLocation& locklocation)
149149
{
150150
constexpr bool is_recursive_mutex =
151-
std::is_base_of<RecursiveMutex, MutexType>::value ||
152-
std::is_base_of<std::recursive_mutex, MutexType>::value;
151+
std::is_base_of_v<RecursiveMutex, MutexType> ||
152+
std::is_base_of_v<std::recursive_mutex, MutexType>;
153153

154154
LockData& lockdata = GetLockData();
155155
std::lock_guard<std::mutex> lock(lockdata.dd_mutex);

‎src/test/fuzz/FuzzedDataProvider.h

+5-5
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ template <typename T> T FuzzedDataProvider::ConsumeIntegral() {
203203
// be less than or equal to |max|.
204204
template <typename T>
205205
T FuzzedDataProvider::ConsumeIntegralInRange(T min, T max) {
206-
static_assert(std::is_integral<T>::value, "An integral type is required.");
206+
static_assert(std::is_integral_v<T>, "An integral type is required.");
207207
static_assert(sizeof(T) <= sizeof(uint64_t), "Unsupported integral type.");
208208

209209
if (min > max)
@@ -271,14 +271,14 @@ T FuzzedDataProvider::ConsumeFloatingPointInRange(T min, T max) {
271271
// Returns a floating point number in the range [0.0, 1.0]. If there's no
272272
// input data left, always returns 0.
273273
template <typename T> T FuzzedDataProvider::ConsumeProbability() {
274-
static_assert(std::is_floating_point<T>::value,
274+
static_assert(std::is_floating_point_v<T>,
275275
"A floating point type is required.");
276276

277277
// Use different integral types for different floating point types in order
278278
// to provide better density of the resulting values.
279279
using IntegralType =
280-
typename std::conditional<(sizeof(T) <= sizeof(uint32_t)), uint32_t,
281-
uint64_t>::type;
280+
typename std::conditional_t<(sizeof(T) <= sizeof(uint32_t)), uint32_t,
281+
uint64_t>;
282282

283283
T result = static_cast<T>(ConsumeIntegral<IntegralType>());
284284
result /= static_cast<T>(std::numeric_limits<IntegralType>::max());
@@ -294,7 +294,7 @@ inline bool FuzzedDataProvider::ConsumeBool() {
294294
// also contain |kMaxValue| aliased to its largest (inclusive) value. Such as:
295295
// enum class Foo { SomeValue, OtherValue, kMaxValue = OtherValue };
296296
template <typename T> T FuzzedDataProvider::ConsumeEnum() {
297-
static_assert(std::is_enum<T>::value, "|T| must be an enum type.");
297+
static_assert(std::is_enum_v<T>, "|T| must be an enum type.");
298298
return static_cast<T>(
299299
ConsumeIntegralInRange<uint32_t>(0, static_cast<uint32_t>(T::kMaxValue)));
300300
}

‎src/test/fuzz/integer.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ FUZZ_TARGET(integer, .init = initialize_integer)
6363
const int16_t i16 = fuzzed_data_provider.ConsumeIntegral<int16_t>();
6464
const uint8_t u8 = fuzzed_data_provider.ConsumeIntegral<uint8_t>();
6565
const int8_t i8 = fuzzed_data_provider.ConsumeIntegral<int8_t>();
66-
// We cannot assume a specific value of std::is_signed<char>::value:
66+
// We cannot assume a specific value of std::is_signed_v<char>:
6767
// ConsumeIntegral<char>() instead of casting from {u,}int8_t.
6868
const char ch = fuzzed_data_provider.ConsumeIntegral<char>();
6969
const bool b = fuzzed_data_provider.ConsumeBool();

‎src/test/fuzz/util.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ template <typename WeakEnumType, size_t size>
134134
{
135135
return fuzzed_data_provider.ConsumeBool() ?
136136
fuzzed_data_provider.PickValueInArray<WeakEnumType>(all_types) :
137-
WeakEnumType(fuzzed_data_provider.ConsumeIntegral<typename std::underlying_type<WeakEnumType>::type>());
137+
WeakEnumType(fuzzed_data_provider.ConsumeIntegral<std::underlying_type_t<WeakEnumType>>());
138138
}
139139

140140
[[nodiscard]] inline opcodetype ConsumeOpcodeType(FuzzedDataProvider& fuzzed_data_provider) noexcept
@@ -207,7 +207,7 @@ template <typename WeakEnumType, size_t size>
207207
template <typename T>
208208
[[nodiscard]] bool MultiplicationOverflow(const T i, const T j) noexcept
209209
{
210-
static_assert(std::is_integral<T>::value, "Integral required.");
210+
static_assert(std::is_integral_v<T>, "Integral required.");
211211
if (std::numeric_limits<T>::is_signed) {
212212
if (i > 0) {
213213
if (j > 0) {

‎src/univalue/include/univalue.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ void UniValue::push_backV(It first, It last)
137137
template <typename Int>
138138
Int UniValue::getInt() const
139139
{
140-
static_assert(std::is_integral<Int>::value);
140+
static_assert(std::is_integral_v<Int>);
141141
checkType(VNUM);
142142
Int result;
143143
const auto [first_nonmatching, error_condition] = std::from_chars(val.data(), val.data() + val.size(), result);

‎src/util/fs.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ static inline std::string PathToString(const path& path)
163163
#ifdef WIN32
164164
return path.utf8string();
165165
#else
166-
static_assert(std::is_same<path::string_type, std::string>::value, "PathToString not implemented on this platform");
166+
static_assert(std::is_same_v<path::string_type, std::string>, "PathToString not implemented on this platform");
167167
return path.std::filesystem::path::string();
168168
#endif
169169
}

‎src/util/overflow.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
template <class T>
1515
[[nodiscard]] bool AdditionOverflow(const T i, const T j) noexcept
1616
{
17-
static_assert(std::is_integral<T>::value, "Integral required.");
17+
static_assert(std::is_integral_v<T>, "Integral required.");
1818
if constexpr (std::numeric_limits<T>::is_signed) {
1919
return (i > 0 && j > std::numeric_limits<T>::max() - i) ||
2020
(i < 0 && j < std::numeric_limits<T>::min() - i);

‎src/util/strencodings.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ namespace {
204204
template <typename T>
205205
bool ParseIntegral(std::string_view str, T* out)
206206
{
207-
static_assert(std::is_integral<T>::value);
207+
static_assert(std::is_integral_v<T>);
208208
// Replicate the exact behavior of strtol/strtoll/strtoul/strtoull when
209209
// handling leading +/- for backwards compatibility.
210210
if (str.length() >= 2 && str[0] == '+' && str[1] == '-') {

‎src/util/strencodings.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ bool SplitHostPort(std::string_view in, uint16_t& portOut, std::string& hostOut)
117117
template <typename T>
118118
T LocaleIndependentAtoi(std::string_view str)
119119
{
120-
static_assert(std::is_integral<T>::value);
120+
static_assert(std::is_integral_v<T>);
121121
T result;
122122
// Emulate atoi(...) handling of white space and leading +/-.
123123
std::string_view s = util::TrimStringView(str);
@@ -178,7 +178,7 @@ constexpr inline bool IsSpace(char c) noexcept {
178178
template <typename T>
179179
std::optional<T> ToIntegral(std::string_view str)
180180
{
181-
static_assert(std::is_integral<T>::value);
181+
static_assert(std::is_integral_v<T>);
182182
T result;
183183
const auto [first_nonmatching, error_condition] = std::from_chars(str.data(), str.data() + str.size(), result);
184184
if (first_nonmatching != str.data() + str.size() || error_condition != std::errc{}) {

‎src/util/vector.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@
2020
* (list initialization always copies).
2121
*/
2222
template<typename... Args>
23-
inline std::vector<typename std::common_type<Args...>::type> Vector(Args&&... args)
23+
inline std::vector<std::common_type_t<Args...>> Vector(Args&&... args)
2424
{
25-
std::vector<typename std::common_type<Args...>::type> ret;
25+
std::vector<std::common_type_t<Args...>> ret;
2626
ret.reserve(sizeof...(args));
2727
// The line below uses the trick from https://www.experts-exchange.com/articles/32502/None-recursive-variadic-templates-with-std-initializer-list.html
2828
(void)std::initializer_list<int>{(ret.emplace_back(std::forward<Args>(args)), 0)...};

‎src/wallet/types.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ enum isminetype : unsigned int {
4848
ISMINE_ENUM_ELEMENTS,
4949
};
5050
/** used for bitflags of isminetype */
51-
using isminefilter = std::underlying_type<isminetype>::type;
51+
using isminefilter = std::underlying_type_t<isminetype>;
5252

5353
/**
5454
* Address purpose field that has been been stored with wallet sending and

0 commit comments

Comments
 (0)
Please sign in to comment.