From acfbec871a9d1674e0659c912254db0780a63e09 Mon Sep 17 00:00:00 2001 From: Danny Robson Date: Thu, 31 Aug 2017 13:48:44 +1000 Subject: [PATCH] view: remove noexcept from redim redim can throw, it shouldn't be noexcept... --- view.hpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/view.hpp b/view.hpp index a7d3f8d5..a027ffe0 100644 --- a/view.hpp +++ b/view.hpp @@ -11,13 +11,14 @@ * See the License for the specific language governing permissions and * limitations under the License. * - * Copyright 2015-2016 Danny Robson + * Copyright 2015-2017 Danny Robson */ -#ifndef __UTIL_VIEW_HPP -#define __UTIL_VIEW_HPP +#ifndef CRUFT_UTIL_VIEW_HPP +#define CRUFT_UTIL_VIEW_HPP +#include "./debug.hpp" #include "./types/traits.hpp" #include @@ -77,8 +78,9 @@ namespace util { } constexpr auto - redim (int count) const noexcept + redim (int count) const { + CHECK_GT (count, 0); if (count > size ()) throw std::invalid_argument ("redim to higher size not allowed"); return view { m_begin, m_begin + count };