From 81a9a2f54fa0d87b0a99162ebdc944411d34c682 Mon Sep 17 00:00:00 2001 From: Oliver Sander <sander@igpm.rwth-aachen.de> Date: Sat, 11 Jul 2015 12:13:42 +0200 Subject: [PATCH] Use std::array instead of 'array' --- dune/common/arraylist.hh | 8 ++++---- dune/common/fmatrix.hh | 4 ++-- dune/common/fvector.hh | 4 ++-- dune/common/parametertree.hh | 6 +++--- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/dune/common/arraylist.hh b/dune/common/arraylist.hh index 3337eac51..19d070f53 100644 --- a/dune/common/arraylist.hh +++ b/dune/common/arraylist.hh @@ -194,13 +194,13 @@ namespace Dune /** * @brief The allocators for the smart pointer. */ - typedef typename A::template rebind<shared_ptr<array<MemberType,chunkSize_> > >::other + typedef typename A::template rebind<shared_ptr<std::array<MemberType,chunkSize_> > >::other SmartPointerAllocator; /** * @brief The allocator for the fixed array. */ - typedef typename A::template rebind<array<MemberType,chunkSize_> >::other + typedef typename A::template rebind<std::array<MemberType,chunkSize_> >::other ArrayAllocator; /** @@ -210,7 +210,7 @@ namespace Dune friend class ConstArrayListIterator<T,N,A>; /** @brief the data chunks of our list. */ - std::vector<shared_ptr<array<MemberType,chunkSize_> >, + std::vector<shared_ptr<std::array<MemberType,chunkSize_> >, SmartPointerAllocator> chunks_; /** @brief The current data capacity. * This is the capacity that the list could have theoretically @@ -493,7 +493,7 @@ namespace Dune size_t index=start_+size_; if(index==capacity_) { - chunks_.push_back(shared_ptr<array<MemberType,chunkSize_> >(new array<MemberType,chunkSize_>())); + chunks_.push_back(shared_ptr<std::array<MemberType,chunkSize_> >(new std::array<MemberType,chunkSize_>())); capacity_ += chunkSize_; } elementAt(index)=entry; diff --git a/dune/common/fmatrix.hh b/dune/common/fmatrix.hh index f55a1b836..f3abc8782 100644 --- a/dune/common/fmatrix.hh +++ b/dune/common/fmatrix.hh @@ -42,7 +42,7 @@ namespace Dune typedef row_type &row_reference; typedef const row_type &const_row_reference; - typedef Dune::array<row_type,ROWS> container_type; + typedef std::array<row_type,ROWS> container_type; typedef K value_type; typedef typename container_type::size_type size_type; }; @@ -65,7 +65,7 @@ namespace Dune template<class K, int ROWS, int COLS> class FieldMatrix : public DenseMatrix< FieldMatrix<K,ROWS,COLS> > { - Dune::array< FieldVector<K,COLS>, ROWS > _data; + std::array< FieldVector<K,COLS>, ROWS > _data; typedef DenseMatrix< FieldMatrix<K,ROWS,COLS> > Base; public: diff --git a/dune/common/fvector.hh b/dune/common/fvector.hh index 72c273675..2b14a5899 100644 --- a/dune/common/fvector.hh +++ b/dune/common/fvector.hh @@ -38,7 +38,7 @@ namespace Dune { struct DenseMatVecTraits< FieldVector<K,SIZE> > { typedef FieldVector<K,SIZE> derived_type; - typedef Dune::array<K,SIZE> container_type; + typedef std::array<K,SIZE> container_type; typedef K value_type; typedef typename container_type::size_type size_type; }; @@ -92,7 +92,7 @@ namespace Dune { class FieldVector : public DenseVector< FieldVector<K,SIZE> > { - Dune::array<K,SIZE> _data; + std::array<K,SIZE> _data; typedef DenseVector< FieldVector<K,SIZE> > Base; public: //! export size diff --git a/dune/common/parametertree.hh b/dune/common/parametertree.hh index 2b0d69e39..cb203b68c 100644 --- a/dune/common/parametertree.hh +++ b/dune/common/parametertree.hh @@ -308,10 +308,10 @@ namespace Dune { }; template<typename T, std::size_t n> - struct ParameterTree::Parser<array<T, n> > { - static array<T, n> + struct ParameterTree::Parser<std::array<T, n> > { + static std::array<T, n> parse(const std::string& str) { - array<T, n> val; + std::array<T, n> val; parseRange(str, val.begin(), val.end()); return val; } -- GitLab