From f62458f075614a42701a2242f5bbe2a005b00f66 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Sun, 27 Dec 2020 19:38:43 -0800 Subject: [PATCH] Define member type Slice::value_type = T --- book/src/binding/slice.md | 2 ++ include/cxx.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/book/src/binding/slice.md b/book/src/binding/slice.md index c565fb0e..fe1691e3 100644 --- a/book/src/binding/slice.md +++ b/book/src/binding/slice.md @@ -17,6 +17,8 @@ template class Slice final { public: + using value_type = T; + Slice() noexcept; Slice(const Slice &) noexcept; Slice(T *, size_t count) noexcept; diff --git a/include/cxx.h b/include/cxx.h index b7deb718..1212de28 100644 --- a/include/cxx.h +++ b/include/cxx.h @@ -147,6 +147,8 @@ template class Slice final : private detail::copy_assignable_if::value> { public: + using value_type = T; + Slice() noexcept; Slice(T *, std::size_t count) noexcept;