aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFei Sun <sunfei.china@outlook.com>2019-04-12 01:40:02 +0800
committerAnna Gringauze <annagrin@microsoft.com>2019-04-11 10:40:02 -0700
commitb74b286d5e333561b0f1ef1abd18de2606624455 (patch)
tree3ef5e0e4239b61b65b93918bbdd7bb2cad5547b2
parent7d78b743e43ecba06ca47426d03d9d16076dec16 (diff)
downloadplatform_external_Microsoft-GSL-b74b286d5e333561b0f1ef1abd18de2606624455.tar.gz
platform_external_Microsoft-GSL-b74b286d5e333561b0f1ef1abd18de2606624455.tar.bz2
platform_external_Microsoft-GSL-b74b286d5e333561b0f1ef1abd18de2606624455.zip
add value_type size_type for string_span (#727)
-rw-r--r--include/gsl/string_span3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/gsl/string_span b/include/gsl/string_span
index b5dfd18..85112e5 100644
--- a/include/gsl/string_span
+++ b/include/gsl/string_span
@@ -175,6 +175,7 @@ class basic_string_span
{
public:
using element_type = CharT;
+ using value_type = std::remove_cv_t<element_type>;
using pointer = std::add_pointer_t<element_type>;
using reference = std::add_lvalue_reference_t<element_type>;
using const_reference = std::add_lvalue_reference_t<std::add_const_t<element_type>>;
@@ -186,6 +187,8 @@ public:
using reverse_iterator = typename impl_type::reverse_iterator;
using const_reverse_iterator = typename impl_type::const_reverse_iterator;
+ using size_type = index_type;
+
// default (empty)
constexpr basic_string_span() noexcept = default;