aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHaibo Huang <hhb@google.com>2019-08-20 15:24:51 -0700
committerandroid-build-merger <android-build-merger@google.com>2019-08-20 15:24:51 -0700
commit2c198cc535ab1a29dc59691bdadc27e06f9336d7 (patch)
tree52c2d1732f4a79220fb68c98f5cea424f1564522
parent5a542b476ab01ef1a223655a2d87fe3d83bb78d3 (diff)
parent97163d0b88931989c01370c75ed7d9cfe4a6c3ce (diff)
downloadplatform_external_Microsoft-GSL-2c198cc535ab1a29dc59691bdadc27e06f9336d7.tar.gz
platform_external_Microsoft-GSL-2c198cc535ab1a29dc59691bdadc27e06f9336d7.tar.bz2
platform_external_Microsoft-GSL-2c198cc535ab1a29dc59691bdadc27e06f9336d7.zip
Upgrade Microsoft-GSL to b576cc6ce375cf42f6537d65a9ef29d67aa6b78e
am: 97163d0b88 Change-Id: I29a98244389e233dacfdcc5b31ca3f9c849243c1
-rw-r--r--METADATA6
-rw-r--r--appveyor.yml20
-rw-r--r--include/gsl/gsl_byte2
-rw-r--r--include/gsl/gsl_util2
-rw-r--r--include/gsl/multi_span10
-rw-r--r--include/gsl/span2
-rw-r--r--include/gsl/string_span1
7 files changed, 24 insertions, 19 deletions
diff --git a/METADATA b/METADATA
index 494ca07..c265a59 100644
--- a/METADATA
+++ b/METADATA
@@ -5,10 +5,10 @@ third_party {
type: GIT
value: "https://github.com/Microsoft/GSL"
}
- version: "b74b286d5e333561b0f1ef1abd18de2606624455"
+ version: "b576cc6ce375cf42f6537d65a9ef29d67aa6b78e"
last_upgrade_date {
year: 2019
- month: 5
- day: 2
+ month: 8
+ day: 19
}
}
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