Skip to content
Snippets Groups Projects
Commit c3b388d3 authored by Markus Blatt's avatar Markus Blatt
Browse files

Default constructor shouldn't be dreprecated as then there is no way

of constructing it.
Added assign methode as ther is no operator=(const T&) in std::tr1::array<T,int>.

[[Imported from SVN: r4970]]
parent f7e10e2c
No related branches found
No related tags found
No related merge requests found
......@@ -135,7 +135,7 @@ namespace Dune
enum { dimension = N };
//! Create uninitialized array
FixedArray () DUNE_DEPRECATED {}
FixedArray () {}
//! Initialize all components with same size
FixedArray (T t) DUNE_DEPRECATED
......@@ -146,13 +146,21 @@ namespace Dune
/** \brief Return array size */
int size() const {return N;}
//! Assign value to all entries
FixedArray<T,N>& operator= (const T& t)
/** \brief Assign value to all entries
* @deprecated Use assign instead.
*/
FixedArray<T,N>& operator= (const T& t) DUNE_DEPRECATED
{
for (int i=0; i<N; i++) a[i]=t;
assign(t);
return (*this);
}
//! \brief Assign value to all entries
void assign(const T& t)
{
for (int i=0; i<N; i++) a[i]=t;
}
//! Component access
T& operator[] (int i)
{
......
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