Skip to content

Commit 3ba4117

Browse files
committedMar 4, 2022
TextView: switch to enable_if_t
1 parent bdd4955 commit 3ba4117

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed
 

‎code/include/swoc/TextView.h

+5-5
Original file line numberDiff line numberDiff line change
@@ -88,11 +88,11 @@ class TextView : public std::string_view {
8888
* to @c char @c const @c * and @c size_t respectively.
8989
*/
9090
template < typename C
91-
, typename = typename std::enable_if<
91+
, typename = std::enable_if_t<
9292
std::is_convertible_v<decltype(std::declval<C>().data()), char const*> &&
9393
std::is_convertible_v<decltype(std::declval<C>().size()), size_t>
9494
, void
95-
>::type
95+
>
9696
> constexpr TextView(C const& c);
9797

9898
/** Construct from literal string or array.
@@ -180,7 +180,7 @@ class TextView : public std::string_view {
180180
/// Explicitly set the view from a @c std::string
181181
self_type &assign(std::string const &s);
182182

183-
/** Assogm from any character container following STL standards.
183+
/** Assign from any character container following STL standards.
184184
*
185185
* @tparam C Container type.
186186
* @param c container
@@ -189,11 +189,11 @@ class TextView : public std::string_view {
189189
* to @c char @c const @c * and @c size_t respectively.
190190
*/
191191
template < typename C
192-
, typename = typename std::enable_if<
192+
, typename = std::enable_if_t<
193193
std::is_convertible_v<decltype(std::declval<C>().data()), char const*> &&
194194
std::is_convertible_v<decltype(std::declval<C>().size()), size_t>
195195
, void
196-
>::type
196+
>
197197
> constexpr self_type & assign(C const& c) {
198198
return this->assign(c.data(), c.size());
199199
}

0 commit comments

Comments
 (0)
Please sign in to comment.