cannot assign values for a DynamicMatrix<bool>
The attached program fails with the error message below. Is there a way to do this correctly or can I simply not use DynamicMatrix?
In file included from /temp/bernd/DUNE24/dune-common/dune/common/dynmatrix.hh:11:0,
from /temp/bernd/DUNE24/dune-common/dune/common/test/dynmatrixtest.cc:7:
/temp/bernd/DUNE24/dune-common/dune/common/dynvector.hh: In instantiation of ‘K& Dune::DynamicVector<K, Allocator>::vec_access(Dune::DynamicVector<K, Allocator>::size_type) [with K = bool; Allocator = std::allocator<bool>; Dune::DynamicVector<K, Allocator>::size_type = long unsigned int]’:
/temp/bernd/DUNE24/dune-common/dune/common/densevector.hh:287:34: required from ‘Dune::DenseVector<V>::value_type& Dune::DenseVector<V>::operator[](Dune::DenseVector<V>::size_type) [with V = Dune::DynamicVector<bool, std::allocator<bool> >; Dune::DenseVector<V>::value_type = bool; Dune::DenseVector<V>::size_type = long unsigned int]’
/temp/bernd/DUNE24/dune-common/dune/common/test/dynmatrixtest.cc:12:11: required from here
/temp/bernd/DUNE24/dune-common/dune/common/dynvector.hh:141:49: error: invalid initialization of non-const reference of type ‘bool&’ from an rvalue of type ‘bool’
K & vec_access(size_type i) { return _data[i]; }
^
In file included from /usr/include/c++/5/vector:65:0,
from /temp/bernd/DUNE24/dune-common/dune/common/dynvector.hh:17,
from /temp/bernd/DUNE24/dune-common/dune/common/dynmatrix.hh:11,
from /temp/bernd/DUNE24/dune-common/dune/common/test/dynmatrixtest.cc:7:
/usr/include/c++/5/bits/stl_bvector.h:80:5: note: after user-defined conversion: std::_Bit_reference::operator bool() const
operator bool() const _GLIBCXX_NOEXCEPT
^