From: Wolfgang Bangerth Date: Thu, 8 Dec 2016 17:30:04 +0000 (-0700) Subject: Add a default constructor for class ArrayView. X-Git-Tag: v8.5.0-rc1~338^2~2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1486a887c1ba7186a10dc9d216b180758f135c08;p=dealii.git 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. --- 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,