Commit 0b5c57f8 authored by Oliver Sander's avatar Oliver Sander

Export the new types 'reference' and 'const_reference'

Just like std containers do.  This addition to the istl vector interface is
necessary to do proper unit testing, because even though reference is value_type&
for FieldVector, it is not for some other istl vectors.
parent 6c343630
......@@ -103,6 +103,12 @@ namespace Dune {
typedef typename Base::size_type size_type;
typedef typename Base::value_type value_type;
/** \brief The type used for references to the vector entry */
typedef value_type& reference;
/** \brief The type used for const references to the vector entry */
typedef const value_type& const_reference;
//! Constructor making default-initialized vector
constexpr FieldVector()
: _data{{}}
......@@ -219,6 +225,12 @@ namespace Dune {
typedef typename Base::size_type size_type;
/** \brief The type used for references to the vector entry */
typedef K& reference;
/** \brief The type used for const references to the vector entry */
typedef const K& const_reference;
//===== construction
/** \brief Default constructor */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment