Skip to content
Snippets Groups Projects
Commit 81a9a2f5 authored by Oliver Sander's avatar Oliver Sander
Browse files

Use std::array instead of 'array'

parent e3eb585c
No related branches found
No related tags found
No related merge requests found
...@@ -194,13 +194,13 @@ namespace Dune ...@@ -194,13 +194,13 @@ namespace Dune
/** /**
* @brief The allocators for the smart pointer. * @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; SmartPointerAllocator;
/** /**
* @brief The allocator for the fixed array. * @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; ArrayAllocator;
/** /**
...@@ -210,7 +210,7 @@ namespace Dune ...@@ -210,7 +210,7 @@ namespace Dune
friend class ConstArrayListIterator<T,N,A>; friend class ConstArrayListIterator<T,N,A>;
/** @brief the data chunks of our list. */ /** @brief the data chunks of our list. */
std::vector<shared_ptr<array<MemberType,chunkSize_> >, std::vector<shared_ptr<std::array<MemberType,chunkSize_> >,
SmartPointerAllocator> chunks_; SmartPointerAllocator> chunks_;
/** @brief The current data capacity. /** @brief The current data capacity.
* This is the capacity that the list could have theoretically * This is the capacity that the list could have theoretically
...@@ -493,7 +493,7 @@ namespace Dune ...@@ -493,7 +493,7 @@ namespace Dune
size_t index=start_+size_; size_t index=start_+size_;
if(index==capacity_) 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_; capacity_ += chunkSize_;
} }
elementAt(index)=entry; elementAt(index)=entry;
......
...@@ -42,7 +42,7 @@ namespace Dune ...@@ -42,7 +42,7 @@ namespace Dune
typedef row_type &row_reference; typedef row_type &row_reference;
typedef const row_type &const_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 K value_type;
typedef typename container_type::size_type size_type; typedef typename container_type::size_type size_type;
}; };
...@@ -65,7 +65,7 @@ namespace Dune ...@@ -65,7 +65,7 @@ namespace Dune
template<class K, int ROWS, int COLS> template<class K, int ROWS, int COLS>
class FieldMatrix : public DenseMatrix< FieldMatrix<K,ROWS,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; typedef DenseMatrix< FieldMatrix<K,ROWS,COLS> > Base;
public: public:
......
...@@ -38,7 +38,7 @@ namespace Dune { ...@@ -38,7 +38,7 @@ namespace Dune {
struct DenseMatVecTraits< FieldVector<K,SIZE> > struct DenseMatVecTraits< FieldVector<K,SIZE> >
{ {
typedef FieldVector<K,SIZE> derived_type; 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 K value_type;
typedef typename container_type::size_type size_type; typedef typename container_type::size_type size_type;
}; };
...@@ -92,7 +92,7 @@ namespace Dune { ...@@ -92,7 +92,7 @@ namespace Dune {
class FieldVector : class FieldVector :
public DenseVector< FieldVector<K,SIZE> > public DenseVector< FieldVector<K,SIZE> >
{ {
Dune::array<K,SIZE> _data; std::array<K,SIZE> _data;
typedef DenseVector< FieldVector<K,SIZE> > Base; typedef DenseVector< FieldVector<K,SIZE> > Base;
public: public:
//! export size //! export size
......
...@@ -308,10 +308,10 @@ namespace Dune { ...@@ -308,10 +308,10 @@ namespace Dune {
}; };
template<typename T, std::size_t n> template<typename T, std::size_t n>
struct ParameterTree::Parser<array<T, n> > { struct ParameterTree::Parser<std::array<T, n> > {
static array<T, n> static std::array<T, n>
parse(const std::string& str) { parse(const std::string& str) {
array<T, n> val; std::array<T, n> val;
parseRange(str, val.begin(), val.end()); parseRange(str, val.begin(), val.end());
return val; return val;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment