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

I am reverting the last patch (use of system implementation of class 'array'),

because it caused an extremely strange segfault.  No idea why.

[[Imported from SVN: r4934]]
parent 30af2f7f
Branches
Tags
No related merge requests found
......@@ -3,24 +3,17 @@
#ifndef DUNE_FIXEDARRAY_HH
#define DUNE_FIXEDARRAY_HH
/** \file
\brief implementation of the stl array class (a static array)
and its deprecated ancestor FixedArray
*/
//***********************************************************************
//
// implementation of peter array
//
//***********************************************************************
#include <iostream>
#include <iomanip>
#include <string>
// Include system implementation of array class if present
#ifdef HAVE_ARRAY
#include <array>
#endif
#ifdef HAVE_TR1_ARRAY
#include <tr1/array>
#endif
namespace Dune
{
/** @addtogroup Common
......@@ -28,12 +21,6 @@ namespace Dune
@{
*/
#ifdef HAVE_ARRAY
using std::array;
#elif defined HAVE_TR1_ARRAY
using std::tr1::array;
#else
/** \brief Simple fixed size array class
*
*/
......@@ -71,10 +58,8 @@ namespace Dune
//! Create uninitialized array
array () {}
/** \brief Initialize all components with same entry
\deprecated Deprecated because the stl implementation of array doesn't have it
*/
array (const T& t) DUNE_DEPRECATED
//! Initialize all components with same size
array (const T& t)
{
for (int i=0; i<N; i++) a[i]=t;
}
......@@ -104,7 +89,7 @@ namespace Dune
protected:
T a[(N > 0) ? N : 1];
};
#endif
//! Output operator for array
template <class T, int N>
inline std::ostream& operator<< (std::ostream& s, array<T,N> e)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment