Skip to content

Commit 4f029b2

Browse files
committed
use enable_if_t instead.
1 parent 1f7c97f commit 4f029b2

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

include/st_utf_conv.h

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ namespace ST
103103

104104
template <typename WcType = wchar_t>
105105
ST_NODISCARD
106-
typename std::enable_if<sizeof(WcType) == sizeof(char16_t), char_buffer>::type
106+
std::enable_if_t<sizeof(WcType) == sizeof(char16_t), char_buffer>
107107
wchar_to_utf8(const wchar_t *wstr, size_t size,
108108
utf_validation_t validation = ST_DEFAULT_VALIDATION)
109109
{
@@ -112,7 +112,7 @@ namespace ST
112112

113113
template <typename WcType = wchar_t>
114114
ST_NODISCARD
115-
typename std::enable_if<sizeof(WcType) == sizeof(char32_t), char_buffer>::type
115+
std::enable_if_t<sizeof(WcType) == sizeof(char32_t), char_buffer>
116116
wchar_to_utf8(const wchar_t *wstr, size_t size,
117117
utf_validation_t validation = ST_DEFAULT_VALIDATION)
118118
{
@@ -328,7 +328,7 @@ namespace ST
328328

329329
template <typename WcType = wchar_t>
330330
ST_NODISCARD
331-
typename std::enable_if<sizeof(WcType) == sizeof(char32_t), utf32_buffer>::type
331+
std::enable_if_t<sizeof(WcType) == sizeof(char32_t), utf32_buffer>
332332
wchar_to_utf32(const wchar_t *wstr, size_t size,
333333
utf_validation_t validation = ST_DEFAULT_VALIDATION)
334334
{
@@ -366,7 +366,7 @@ namespace ST
366366

367367
template <typename WcType = wchar_t>
368368
ST_NODISCARD
369-
typename std::enable_if<sizeof(WcType) == sizeof(char16_t), wchar_buffer>::type
369+
std::enable_if_t<sizeof(WcType) == sizeof(char16_t), wchar_buffer>
370370
utf8_to_wchar(const char *utf8, size_t size,
371371
utf_validation_t validation = ST_DEFAULT_VALIDATION)
372372
{
@@ -387,7 +387,7 @@ namespace ST
387387

388388
template <typename WcType = wchar_t>
389389
ST_NODISCARD
390-
typename std::enable_if<sizeof(WcType) == sizeof(char32_t), wchar_buffer>::type
390+
std::enable_if_t<sizeof(WcType) == sizeof(char32_t), wchar_buffer>
391391
utf8_to_wchar(const char *utf8, size_t size,
392392
utf_validation_t validation = ST_DEFAULT_VALIDATION)
393393
{
@@ -424,7 +424,7 @@ namespace ST
424424

425425
template <typename WcType = wchar_t>
426426
ST_NODISCARD
427-
typename std::enable_if<sizeof(WcType) == sizeof(char16_t), wchar_buffer>::type
427+
std::enable_if_t<sizeof(WcType) == sizeof(char16_t), wchar_buffer>
428428
utf16_to_wchar(const char16_t *utf16, size_t size,
429429
utf_validation_t validation = ST_DEFAULT_VALIDATION)
430430
{
@@ -434,7 +434,7 @@ namespace ST
434434

435435
template <typename WcType = wchar_t>
436436
ST_NODISCARD
437-
typename std::enable_if<sizeof(WcType) == sizeof(char32_t), wchar_buffer>::type
437+
std::enable_if_t<sizeof(WcType) == sizeof(char32_t), wchar_buffer>
438438
utf16_to_wchar(const char16_t *utf16, size_t size,
439439
utf_validation_t validation = ST_DEFAULT_VALIDATION)
440440
{
@@ -462,7 +462,7 @@ namespace ST
462462

463463
template <typename WcType = wchar_t>
464464
ST_NODISCARD
465-
typename std::enable_if<sizeof(WcType) == sizeof(char16_t), wchar_buffer>::type
465+
std::enable_if_t<sizeof(WcType) == sizeof(char16_t), wchar_buffer>
466466
utf32_to_wchar(const char32_t *utf32, size_t size,
467467
utf_validation_t validation = ST_DEFAULT_VALIDATION)
468468
{
@@ -483,7 +483,7 @@ namespace ST
483483

484484
template <typename WcType = wchar_t>
485485
ST_NODISCARD
486-
typename std::enable_if<sizeof(WcType) == sizeof(char32_t), wchar_buffer>::type
486+
std::enable_if_t<sizeof(WcType) == sizeof(char32_t), wchar_buffer>
487487
utf32_to_wchar(const char32_t *utf32, size_t size,
488488
utf_validation_t validation = ST_DEFAULT_VALIDATION)
489489
{
@@ -500,7 +500,7 @@ namespace ST
500500

501501
template <typename WcType = wchar_t>
502502
ST_NODISCARD
503-
typename std::enable_if<sizeof(WcType) == sizeof(char16_t), wchar_buffer>::type
503+
std::enable_if_t<sizeof(WcType) == sizeof(char16_t), wchar_buffer>
504504
latin_1_to_wchar(const char *astr, size_t size)
505505
{
506506
ST_ASSERT(size < ST_HUGE_BUFFER_SIZE, "String data buffer is too large");
@@ -518,7 +518,7 @@ namespace ST
518518

519519
template <typename WcType = wchar_t>
520520
ST_NODISCARD
521-
typename std::enable_if<sizeof(WcType) == sizeof(char32_t), wchar_buffer>::type
521+
std::enable_if_t<sizeof(WcType) == sizeof(char32_t), wchar_buffer>
522522
latin_1_to_wchar(const char *astr, size_t size)
523523
{
524524
ST_ASSERT(size < ST_HUGE_BUFFER_SIZE, "String data buffer is too large");
@@ -639,7 +639,7 @@ namespace ST
639639

640640
template <typename WcType = wchar_t>
641641
ST_NODISCARD
642-
typename std::enable_if<sizeof(WcType) == sizeof(char16_t), char_buffer>::type
642+
std::enable_if_t<sizeof(WcType) == sizeof(char16_t), char_buffer>
643643
wchar_to_latin_1(const wchar_t *wstr, size_t size,
644644
utf_validation_t validation = ST_DEFAULT_VALIDATION,
645645
bool substitute_out_of_range = true)
@@ -650,7 +650,7 @@ namespace ST
650650

651651
template <typename WcType = wchar_t>
652652
ST_NODISCARD
653-
typename std::enable_if<sizeof(WcType) == sizeof(char32_t), char_buffer>::type
653+
std::enable_if_t<sizeof(WcType) == sizeof(char32_t), char_buffer>
654654
wchar_to_latin_1(const wchar_t *wstr, size_t size,
655655
utf_validation_t validation = ST_DEFAULT_VALIDATION,
656656
bool substitute_out_of_range = true)

0 commit comments

Comments
 (0)