@@ -114,7 +114,7 @@ class ORC_RT_NODISCARD Error {
114114 void setChecked (bool Checked) { ErrPtr = (ErrPtr & ~uintptr_t (1 )) | Checked; }
115115
116116 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>,
118118 " ErrT is not an ErrorInfoBase subclass" );
119119 std::unique_ptr<ErrT> Tmp (getPtr<ErrT>());
120120 setPtr (nullptr );
@@ -292,7 +292,7 @@ template <typename T> class ORC_RT_NODISCARD Expected {
292292
293293 template <class OtherT > friend class Expected ;
294294
295- static constexpr bool IsRef = std::is_reference <T>::value ;
295+ static constexpr bool IsRef = std::is_reference_v <T>;
296296 using wrap = std::reference_wrapper<std::remove_reference_t <T>>;
297297 using error_type = std::unique_ptr<ErrorInfoBase>;
298298 using storage_type = std::conditional_t <IsRef, wrap, T>;
@@ -313,7 +313,7 @@ template <typename T> class ORC_RT_NODISCARD Expected {
313313 // / Create an Expected from a T value.
314314 template <typename OtherT>
315315 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 )
317317 : HasError(false ), Unchecked(true ) {
318318 new (getStorage ()) storage_type (std::forward<OtherT>(Val));
319319 }
@@ -324,9 +324,8 @@ template <typename T> class ORC_RT_NODISCARD Expected {
324324 // / Move construct an Expected<T> value from an Expected<OtherT>, where OtherT
325325 // / must be convertible to T.
326326 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 ) {
330329 moveConstruct (std::move (Other));
331330 }
332331
@@ -335,7 +334,7 @@ template <typename T> class ORC_RT_NODISCARD Expected {
335334 template <class OtherT >
336335 explicit Expected (
337336 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 ) {
339338 moveConstruct (std::move (Other));
340339 }
341340
0 commit comments