From 2a1ef2540687efcf1a62c8213404b242e792bff3 Mon Sep 17 00:00:00 2001 From: JACK_1729 Date: Wed, 20 Feb 2019 20:25:50 +0530 Subject: Update span About my Issue - https://github.com/Microsoft/GSL/issues/765 --- include/gsl/span | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) {} -- cgit v1.2.3 From 66809c6852a0250243db893ab5460bfdace063c4 Mon Sep 17 00:00:00 2001 From: Ian Taylor Date: Thu, 6 Jun 2019 17:16:08 -0400 Subject: make TypeListIndexer constexpr (#733) --- include/gsl/multi_span | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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 - const TypeChain& getObj(std::true_type) + constexpr const TypeChain& getObj(std::true_type) { return obj_; } template - auto getObj(std::false_type) + constexpr auto getObj(std::false_type) -> decltype(TypeListIndexer(static_cast(obj_)).template get()) { return TypeListIndexer(static_cast(obj_)).template get(); } template - auto get() -> decltype(getObj(std::integral_constant())) + constexpr auto get() -> decltype(getObj(std::integral_constant())) { return getObj(std::integral_constant()); } }; template - TypeListIndexer createTypeListIndexer(const TypeChain& obj) + constexpr TypeListIndexer createTypeListIndexer(const TypeChain& obj) { return TypeListIndexer(obj); } -- cgit v1.2.3 From 1212beae777dba02c230ece8c0c0ec12790047ea Mon Sep 17 00:00:00 2001 From: NN Date: Thu, 13 Jun 2019 07:27:49 +0300 Subject: Add Visual Studio 2019 image for tests (#787) * Add Visual Studio 2019 image for tests Refer to https://github.com/appveyor/ci/issues/2907 VS2019 is enabled per request. * Use CMake 3.14 * Fix CMake output directory * trigger build * Trigger build --- appveyor.yml | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) 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" -- cgit v1.2.3 From b05a4464b90d8faf8528ec2c6185c02a0ac93b1f Mon Sep 17 00:00:00 2001 From: Eyal Rozenberg Date: Mon, 5 Aug 2019 13:16:42 +0300 Subject: Fixes #798 : Dropped inclusion of `gsl/pointers` in `string_span`. --- include/gsl/string_span | 1 - 1 file changed, 1 deletion(-) 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 // for Ensures, Expects #include // for narrow_cast #include // for operator!=, operator==, dynamic_extent -#include // for not_null #include // for equal, lexicographical_compare #include // for array -- cgit v1.2.3 From 1d48188de9e979a27f29286d76bb0622323a8952 Mon Sep 17 00:00:00 2001 From: beinhaerter <34543625+beinhaerter@users.noreply.github.com> Date: Wed, 14 Aug 2019 21:40:35 +0200 Subject: Fixed check if std::byte is available (#764) The check for std::byte existance fails on gcc 8.2. According to https://en.cppreference.com/w/cpp/utility/feature_test it is necessary to `#include ` before checking `__cpp_lib_byte`. --- include/gsl/gsl_byte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 /* __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 #else // defined(__cplusplus) && (__cplusplus >= 201703L) && // (defined(__cpp_lib_byte) && (__cpp_lib_byte >= 201603) || -- cgit v1.2.3 From cee1929de77eb2fa22bb329900f6ce00be9f6e82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johel=20Ernesto=20Guerrero=20Pe=C3=B1a?= Date: Wed, 14 Aug 2019 15:56:53 -0400 Subject: Fix GNUC typo (#780) Resolves #779 --- include/gsl/gsl_util | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- cgit v1.2.3