@@ -114,7 +114,7 @@ class ORC_RT_NODISCARD Error {
114
114
void setChecked (bool Checked) { ErrPtr = (ErrPtr & ~uintptr_t (1 )) | Checked; }
115
115
116
116
template <typename ErrT = ErrorInfoBase> std::unique_ptr<ErrT> takePayload () {
117
- static_assert (std::is_base_of <ErrorInfoBase, ErrT>::value ,
117
+ static_assert (std::is_base_of_v <ErrorInfoBase, ErrT>,
118
118
" ErrT is not an ErrorInfoBase subclass" );
119
119
std::unique_ptr<ErrT> Tmp (getPtr<ErrT>());
120
120
setPtr (nullptr );
@@ -292,7 +292,7 @@ template <typename T> class ORC_RT_NODISCARD Expected {
292
292
293
293
template <class OtherT > friend class Expected ;
294
294
295
- static constexpr bool IsRef = std::is_reference <T>::value ;
295
+ static constexpr bool IsRef = std::is_reference_v <T>;
296
296
using wrap = std::reference_wrapper<std::remove_reference_t <T>>;
297
297
using error_type = std::unique_ptr<ErrorInfoBase>;
298
298
using storage_type = std::conditional_t <IsRef, wrap, T>;
@@ -313,7 +313,7 @@ template <typename T> class ORC_RT_NODISCARD Expected {
313
313
// / Create an Expected from a T value.
314
314
template <typename OtherT>
315
315
Expected (OtherT &&Val,
316
- std::enable_if_t <std::is_convertible <OtherT, T>::value > * = nullptr )
316
+ std::enable_if_t <std::is_convertible_v <OtherT, T>> * = nullptr )
317
317
: HasError(false ), Unchecked(true ) {
318
318
new (getStorage ()) storage_type (std::forward<OtherT>(Val));
319
319
}
@@ -324,9 +324,8 @@ template <typename T> class ORC_RT_NODISCARD Expected {
324
324
// / Move construct an Expected<T> value from an Expected<OtherT>, where OtherT
325
325
// / must be convertible to T.
326
326
template <class OtherT >
327
- Expected (
328
- Expected<OtherT> &&Other,
329
- std::enable_if_t <std::is_convertible<OtherT, T>::value> * = nullptr ) {
327
+ Expected (Expected<OtherT> &&Other,
328
+ std::enable_if_t <std::is_convertible_v<OtherT, T>> * = nullptr ) {
330
329
moveConstruct (std::move (Other));
331
330
}
332
331
@@ -335,7 +334,7 @@ template <typename T> class ORC_RT_NODISCARD Expected {
335
334
template <class OtherT >
336
335
explicit Expected (
337
336
Expected<OtherT> &&Other,
338
- std::enable_if_t <!std::is_convertible <OtherT, T>::value > * = nullptr ) {
337
+ std::enable_if_t <!std::is_convertible_v <OtherT, T>> * = nullptr ) {
339
338
moveConstruct (std::move (Other));
340
339
}
341
340
0 commit comments