From 7eb8f41af544941c712916dc0cb2c6c6ef7768ac Mon Sep 17 00:00:00 2001 From: beinhaerter <34543625+beinhaerter@users.noreply.github.com> Date: Fri, 23 Feb 2018 22:35:36 +0100 Subject: [PATCH] constexpr for make_span (#627) --- include/gsl/span | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/include/gsl/span b/include/gsl/span index 9d67fb6..36c8a8b 100644 --- a/include/gsl/span +++ b/include/gsl/span @@ -619,43 +619,43 @@ as_writeable_bytes(span s) GSL_NOEXCEPT // make_span() - Utility functions for creating spans // template -span make_span(ElementType* ptr, typename span::index_type count) +constexpr span make_span(ElementType* ptr, typename span::index_type count) { return span(ptr, count); } template -span make_span(ElementType* firstElem, ElementType* lastElem) +constexpr span make_span(ElementType* firstElem, ElementType* lastElem) { return span(firstElem, lastElem); } template -span make_span(ElementType (&arr)[N]) +constexpr span make_span(ElementType (&arr)[N]) { return span(arr); } template -span make_span(Container& cont) +constexpr span make_span(Container& cont) { return span(cont); } template -span make_span(const Container& cont) +constexpr span make_span(const Container& cont) { return span(cont); } template -span make_span(Ptr& cont, std::ptrdiff_t count) +constexpr span make_span(Ptr& cont, std::ptrdiff_t count) { return span(cont, count); } template -span make_span(Ptr& cont) +constexpr span make_span(Ptr& cont) { return span(cont); }