From: Wolfgang Bangerth Date: Tue, 10 Oct 2023 16:32:33 +0000 (-0600) Subject: Let the delegated constructor deal with the case of empty arrays. X-Git-Tag: relicensing~414^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F16114%2Fhead;p=dealii.git Let the delegated constructor deal with the case of empty arrays. --- diff --git a/include/deal.II/base/array_view.h b/include/deal.II/base/array_view.h index d158f86a7f..03f2e5146a 100644 --- a/include/deal.II/base/array_view.h +++ b/include/deal.II/base/array_view.h @@ -563,8 +563,7 @@ inline ArrayView::ArrayView( const std::initializer_list> &initializer) DEAL_II_CXX20_REQUIRES(std::is_const_v) : // use delegating constructor - ArrayView((initializer.size() > 0 ? initializer.begin() : nullptr), - initializer.size()) + ArrayView(initializer.begin(), initializer.size()) {}