@@ -42,23 +42,22 @@ struct Description {
4242 template <class U >
4343 Description (Description<_description, U>&& _field) : value_(_field.get()) {}
4444
45- template <class U , typename std::enable_if<std::is_convertible_v<U, Type>,
46- bool >::type = true >
45+ template <class U >
46+ requires std::is_convertible_v<U, Type >
4747 Description (const U& _value) : value_(_value) {}
4848
49- template <class U , typename std::enable_if<std::is_convertible_v<U, Type>,
50- bool >::type = true >
49+ template <class U >
50+ requires std::is_convertible_v<U, Type >
5151 Description (U&& _value) noexcept : value_(std::forward<U>(_value)) {}
5252
53- template <class U , typename std::enable_if<std::is_convertible_v<U, Type>,
54- bool >::type = true >
53+ template <class U >
54+ requires std::is_convertible_v<U, Type >
5555 Description (const Description<_description, U>& _field)
5656 : value_(_field.value()) {}
5757
5858 // / Assigns the underlying object to its default value.
59- template <class U = Type,
60- typename std::enable_if<std::is_default_constructible_v<U>,
61- bool >::type = true >
59+ template <class U = Type>
60+ requires std::is_default_constructible_v<U>
6261 Description (const Default&) : value_(Type()) {}
6362
6463 ~Description () = default ;
@@ -88,29 +87,26 @@ struct Description {
8887 }
8988
9089 // / Assigns the underlying object.
91- template <class U , typename std::enable_if<std::is_convertible_v<U, Type>,
92- bool >::type = true >
90+ template <class U >
91+ requires std::is_convertible_v<U, Type >
9392 auto & operator =(const U& _value) {
9493 value_ = _value;
9594 return *this ;
9695 }
9796
9897 // / Assigns the underlying object to its default value.
99- template <class U = Type,
100- typename std::enable_if<std::is_default_constructible_v<U>,
101- bool >::type = true >
98+ template <class U = Type>
99+ requires std::is_default_constructible_v<U>
102100 auto & operator =(const Default&) {
103101 value_ = Type ();
104102 return *this ;
105103 }
106104
107105 // / Assigns the underlying object.
108- Description& operator =(
109- const Description& _field) = default ;
106+ Description& operator =(const Description& _field) = default ;
110107
111108 // / Assigns the underlying object.
112- Description& operator =(
113- Description&& _field) = default ;
109+ Description& operator =(Description&& _field) = default ;
114110
115111 // / Assigns the underlying object.
116112 template <class U >
0 commit comments