Skip to content

Commit 23e835a

Browse files
committed
use nssv_COMPILER_GNUC_VERSION for changes from #53
1 parent ced5f2e commit 23e835a

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

include/nonstd/string_view.hpp

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -434,11 +434,9 @@ using std::operator<<;
434434
# pragma clang diagnostic ignored "-Wreserved-user-defined-literal"
435435
# pragma clang diagnostic push
436436
# pragma clang diagnostic ignored "-Wuser-defined-literals"
437-
#elif defined(__GNUC__)
438-
# if (__GNUC__ * 100 + __GNUC_MINOR__) >= 408
437+
#elif nssv_COMPILER_GNUC_VERSION >= 480
439438
# pragma GCC diagnostic push
440439
# pragma GCC diagnostic ignored "-Wliteral-suffix"
441-
# endif
442440
#endif // __clang__
443441

444442
#if nssv_COMPILER_MSVC_VERSION >= 140
@@ -453,12 +451,8 @@ using std::operator<<;
453451

454452
#if defined(__clang__)
455453
# define nssv_RESTORE_WARNINGS() _Pragma("clang diagnostic pop")
456-
#elif defined(__GNUC__)
457-
# if (__GNUC__ * 100 + __GNUC_MINOR__) >= 408
454+
#elif nssv_COMPILER_GNUC_VERSION >= 480
458455
# define nssv_RESTORE_WARNINGS() _Pragma("GCC diagnostic pop")
459-
# else
460-
# define nssv_RESTORE_WARNINGS()
461-
# endif
462456
#elif nssv_COMPILER_MSVC_VERSION >= 140
463457
# define nssv_RESTORE_WARNINGS() __pragma(warning(pop ))
464458
#else

0 commit comments

Comments
 (0)