diff options
| -rw-r--r-- | METADATA | 6 | ||||
| -rw-r--r-- | README.md | 2 | ||||
| -rw-r--r-- | appveyor.yml | 20 | ||||
| -rw-r--r-- | include/gsl/gsl_byte | 2 | ||||
| -rw-r--r-- | include/gsl/gsl_util | 2 | ||||
| -rw-r--r-- | include/gsl/multi_span | 10 | ||||
| -rw-r--r-- | include/gsl/span | 2 | ||||
| -rw-r--r-- | include/gsl/string_span | 1 | ||||
| -rw-r--r-- | tests/multi_span_tests.cpp | 4 | ||||
| -rw-r--r-- | tests/notnull_tests.cpp | 4 |
10 files changed, 32 insertions, 21 deletions
@@ -5,10 +5,10 @@ third_party { type: GIT value: "https://github.com/Microsoft/GSL" } - version: "b74b286d5e333561b0f1ef1abd18de2606624455" + version: "23066c829f227ca75cf44f7d727230fcdb7ccc8a" last_upgrade_date { year: 2019 - month: 5 - day: 2 + month: 9 + day: 24 } } @@ -36,6 +36,8 @@ The test suite that exercises GSL has been built and passes successfully on the * GNU/Linux using Clang/LLVM 6.0 * GNU/Linux using Clang/LLVM 7.0 * GNU/Linux using GCC 5.1 +* OS X Mojave 10.14.4 using Apple LLVM version 10.0.0 (10.0.1.10010046) +* OS X Mojave 10.14.3 using Apple LLVM version 10.0.0 (clang-1000.11.45.5) * OS X Yosemite using Xcode with Apple Clang 7.0.0.7000072 * OS X Yosemite using GCC-5.2.0 * OS X Sierra 10.12.4 using Apple LLVM version 8.1.0 (Clang-802.0.42) diff --git a/appveyor.yml b/appveyor.yml index c3e3c87..6feaf7c 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -11,6 +11,7 @@ configuration: image: - Visual Studio 2015 - Visual Studio 2017 + - Visual Studio 2019 environment: NINJA_TAG: v1.8.2 @@ -18,6 +19,7 @@ environment: NINJA_PATH: C:\Tools\ninja\ninja-%NINJA_TAG% VCVAR2015: 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat' VCVAR2017: 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat' + VCVAR2019: 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat' matrix: - GSL_CXX_STANDARD: 14 USE_TOOLSET: MSVC @@ -41,7 +43,7 @@ matrix: USE_GENERATOR: MSBuild cache: - - C:\cmake-3.8.0-win32-x86 + - C:\cmake-3.14.4-win32-x86 - C:\Tools\ninja install: @@ -58,11 +60,11 @@ install: $env:PATH = "$env:NINJA_PATH;$env:PATH" } else { Write-Warning "Failed to find ninja.exe in expected location." } if ($env:USE_TOOLSET -ne "LLVM") { - if (![IO.File]::Exists("C:\cmake-3.8.0-win32-x86\bin\cmake.exe")) { - Start-FileDownload 'https://cmake.org/files/v3.8/cmake-3.8.0-win32-x86.zip' - 7z x -y -bso0 cmake-3.8.0-win32-x86.zip -oC:\ + if (![IO.File]::Exists("C:\cmake-3.14.0-win32-x86\bin\cmake.exe")) { + Start-FileDownload 'https://cmake.org/files/v3.14/cmake-3.14.4-win32-x86.zip' + 7z x -y -bso0 cmake-3.14.4-win32-x86.zip -oC:\ } - $env:PATH="C:\cmake-3.8.0-win32-x86\bin;$env:PATH" + $env:PATH="C:\cmake-3.14.4-win32-x86\bin;$env:PATH" } before_build: @@ -72,16 +74,20 @@ before_build: $Architecture = $env:PLATFORM if ("$env:APPVEYOR_BUILD_WORKER_IMAGE" -eq "Visual Studio 2015") { $env:VCVARSALL = "`"$env:VCVAR2015`" $Architecture" - } else { + } elseif ("$env:APPVEYOR_BUILD_WORKER_IMAGE" -eq "Visual Studio 2017") { $env:VCVARSALL = "`"$env:VCVAR2017`" $Architecture" + } else { + $env:VCVARSALL = "`"$env:VCVAR2019`" $Architecture" } $env:CMakeGenFlags = "-G Ninja -DGSL_CXX_STANDARD=$env:GSL_CXX_STANDARD" } else { $GeneratorFlags = '/m /v:minimal' if ("$env:APPVEYOR_BUILD_WORKER_IMAGE" -eq "Visual Studio 2015") { $Generator = 'Visual Studio 14 2015' - } else { + } elseif ("$env:APPVEYOR_BUILD_WORKER_IMAGE" -eq "Visual Studio 2017") { $Generator = 'Visual Studio 15 2017' + } else { + $Generator = 'Visual Studio 16 2019' } if ("$env:PLATFORM" -eq "x86") { $Architecture = "Win32" diff --git a/include/gsl/gsl_byte b/include/gsl/gsl_byte index 861446d..1670646 100644 --- a/include/gsl/gsl_byte +++ b/include/gsl/gsl_byte @@ -56,6 +56,7 @@ #else // _MSC_VER #ifndef GSL_USE_STD_BYTE +#include <cstddef> /* __cpp_lib_byte */ // this tests if we are under GCC or Clang with enough -std:c++1z power to get us std::byte // also check if libc++ version is sufficient (> 5.0) or libstc++ actually contains std::byte #if defined(__cplusplus) && (__cplusplus >= 201703L) && \ @@ -63,7 +64,6 @@ defined(_LIBCPP_VERSION) && (_LIBCPP_VERSION >= 5000)) #define GSL_USE_STD_BYTE 1 -#include <cstddef> #else // defined(__cplusplus) && (__cplusplus >= 201703L) && // (defined(__cpp_lib_byte) && (__cpp_lib_byte >= 201603) || diff --git a/include/gsl/gsl_util b/include/gsl/gsl_util index 4addde6..0fce689 100644 --- a/include/gsl/gsl_util +++ b/include/gsl/gsl_util @@ -37,7 +37,7 @@ #endif // _MSC_VER < 1910 #endif // _MSC_VER -#if (defined(_MSC_VER) && _MSC_VER < 1910) || (!defined(__clang__) && defined(__GNUC__) && __GUNC__ < 6) +#if (defined(_MSC_VER) && _MSC_VER < 1910) || (!defined(__clang__) && defined(__GNUC__) && __GNUC__ < 6) #define GSL_CONSTEXPR_NARROW 0 #else #define GSL_CONSTEXPR_NARROW 1 diff --git a/include/gsl/multi_span b/include/gsl/multi_span index f1a909e..0c1506e 100644 --- a/include/gsl/multi_span +++ b/include/gsl/multi_span @@ -518,31 +518,31 @@ namespace details struct TypeListIndexer { const TypeChain& obj_; - TypeListIndexer(const TypeChain& obj) : obj_(obj) {} + constexpr TypeListIndexer(const TypeChain& obj) : obj_(obj) {} template <std::size_t N> - const TypeChain& getObj(std::true_type) + constexpr const TypeChain& getObj(std::true_type) { return obj_; } template <std::size_t N, typename MyChain = TypeChain, typename MyBase = typename MyChain::Base> - auto getObj(std::false_type) + constexpr auto getObj(std::false_type) -> decltype(TypeListIndexer<MyBase>(static_cast<const MyBase&>(obj_)).template get<N>()) { return TypeListIndexer<MyBase>(static_cast<const MyBase&>(obj_)).template get<N>(); } template <std::size_t N> - auto get() -> decltype(getObj<N - 1>(std::integral_constant<bool, N == 0>())) + constexpr auto get() -> decltype(getObj<N - 1>(std::integral_constant<bool, N == 0>())) { return getObj<N - 1>(std::integral_constant<bool, N == 0>()); } }; template <typename TypeChain> - TypeListIndexer<TypeChain> createTypeListIndexer(const TypeChain& obj) + constexpr TypeListIndexer<TypeChain> createTypeListIndexer(const TypeChain& obj) { return TypeListIndexer<TypeChain>(obj); } diff --git a/include/gsl/span b/include/gsl/span index b4da532..59bd121 100644 --- a/include/gsl/span +++ b/include/gsl/span @@ -141,7 +141,7 @@ namespace details span_iterator() = default; - constexpr span_iterator(const Span* span, typename Span::index_type idx) noexcept + constexpr span_iterator(const Span* span, difference_type idx) noexcept : span_(span), index_(idx) {} diff --git a/include/gsl/string_span b/include/gsl/string_span index 85112e5..37cbe15 100644 --- a/include/gsl/string_span +++ b/include/gsl/string_span @@ -20,7 +20,6 @@ #include <gsl/gsl_assert> // for Ensures, Expects #include <gsl/gsl_util> // for narrow_cast #include <gsl/span> // for operator!=, operator==, dynamic_extent -#include <gsl/pointers> // for not_null #include <algorithm> // for equal, lexicographical_compare #include <array> // for array diff --git a/tests/multi_span_tests.cpp b/tests/multi_span_tests.cpp index 7e3ec89..17188be 100644 --- a/tests/multi_span_tests.cpp +++ b/tests/multi_span_tests.cpp @@ -1220,6 +1220,8 @@ TEST_CASE("md_access") expected += 3; } } + + delete[] image_ptr; } GSL_SUPPRESS(con.4) // NO-FORMAT: attribute @@ -1616,6 +1618,8 @@ TEST_CASE("span_structure_size") multi_span<const double, dynamic_range, 6, 4> av2 = as_multi_span(av1, dim(5), dim<6>(), dim<4>()); (void) av2; + + delete[] arr; } GSL_SUPPRESS(con.4) // NO-FORMAT: attribute diff --git a/tests/notnull_tests.cpp b/tests/notnull_tests.cpp index ce5a123..010dd00 100644 --- a/tests/notnull_tests.cpp +++ b/tests/notnull_tests.cpp @@ -234,8 +234,8 @@ void ostream_helper(T v) { std::ostringstream os; std::ostringstream ref; - os << p; - ref << &v; + os << static_cast<void*>(p); + ref << static_cast<void*>(&v); CHECK(os.str() == ref.str()); } { |
