From 1486a887c1ba7186a10dc9d216b180758f135c08 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Thu, 8 Dec 2016 10:30:04 -0700 Subject: [PATCH] Add a default constructor for class ArrayView. Right now, one can only create such an object pointing to a specific array. It is not possible to default construct it, and consequently you can't put them into collections, for example. --- include/deal.II/base/array_view.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/include/deal.II/base/array_view.h b/include/deal.II/base/array_view.h index 77c96b02b0..6850c1b2a3 100644 --- a/include/deal.II/base/array_view.h +++ b/include/deal.II/base/array_view.h @@ -77,6 +77,12 @@ public: */ typedef ElementType value_type; + /** + * Default constructor. Creates an invalid view that does not point to + * anything at all. + */ + ArrayView (); + /** * Constructor. * @@ -147,6 +153,16 @@ private: //--------------------------------------------------------------------------- +template +inline +ArrayView::ArrayView() + : + starting_element (NULL), + n_elements(0) +{} + + + template inline ArrayView::ArrayView(value_type *starting_element, -- 2.39.5