From 853b061141727cad737043653719c69cb56b640a Mon Sep 17 00:00:00 2001 From: Jordan Maples Date: Wed, 15 Jul 2020 11:38:41 -0700 Subject: [PATCH 1/2] remove msvc < 1910 checks as those versions are no longer supported. --- include/gsl/multi_span | 5 ----- include/gsl/pointers | 6 ------ 2 files changed, 11 deletions(-) diff --git a/include/gsl/multi_span b/include/gsl/multi_span index ce05a8b..c259f79 100644 --- a/include/gsl/multi_span +++ b/include/gsl/multi_span @@ -50,11 +50,6 @@ #pragma warning(disable : 26465) // TODO: bug - suppression does not work on template functions #pragma warning(disable : 4996) // use of function or classes marked [[deprecated]] -#if _MSC_VER < 1910 -#pragma push_macro("constexpr") -#define constexpr /*constexpr*/ - -#endif // _MSC_VER < 1910 #endif // _MSC_VER #if defined(__GNUC__) || defined(__clang__) diff --git a/include/gsl/pointers b/include/gsl/pointers index 1caf294..62f023b 100644 --- a/include/gsl/pointers +++ b/include/gsl/pointers @@ -25,12 +25,6 @@ #include // for hash #include // for enable_if_t, is_convertible, is_assignable -#if defined(_MSC_VER) && _MSC_VER < 1910 && !defined(__clang__) -#pragma push_macro("constexpr") -#define constexpr /*constexpr*/ - -#endif // defined(_MSC_VER) && _MSC_VER < 1910 - namespace gsl { From 478d8769518d268d9248128bde4cfc7adc493bef Mon Sep 17 00:00:00 2001 From: Jordan Maples Date: Wed, 15 Jul 2020 11:43:29 -0700 Subject: [PATCH 2/2] remove pragma pop for constexpr macro --- include/gsl/multi_span | 5 ----- include/gsl/pointers | 7 ------- 2 files changed, 12 deletions(-) diff --git a/include/gsl/multi_span b/include/gsl/multi_span index c259f79..120b0c5 100644 --- a/include/gsl/multi_span +++ b/include/gsl/multi_span @@ -2247,11 +2247,6 @@ general_span_iterator operator+(typename general_span_iterator::diff } // namespace gsl #if defined(_MSC_VER) && !defined(__clang__) -#if _MSC_VER < 1910 - -#undef constexpr -#pragma pop_macro("constexpr") -#endif // _MSC_VER < 1910 #pragma warning(pop) diff --git a/include/gsl/pointers b/include/gsl/pointers index 62f023b..5e49f5f 100644 --- a/include/gsl/pointers +++ b/include/gsl/pointers @@ -285,11 +285,4 @@ struct hash> } // namespace std -#if defined(_MSC_VER) && _MSC_VER < 1910 && !defined(__clang__) - -#undef constexpr -#pragma pop_macro("constexpr") - -#endif // defined(_MSC_VER) && _MSC_VER < 1910 && !defined(__clang__) - #endif // GSL_POINTERS_H