deprecate `VectorSize`

Closes: #152
parent e77a2cfb
......@@ -44,6 +44,9 @@
- The `inkscape_generate_png_from_svg` CMake function is deprecated and will be removed
after 2.7.
- The `VectorSize` helper has been deprecated. The `size()` method of
vectors should be called directly instead.
# Release 2.6
**This release is dedicated to Elias Pipping (1986-2017).**
......
......@@ -12,6 +12,7 @@
#include <dune/common/boundschecking.hh>
#include <dune/common/classname.hh>
#include <dune/common/deprecated.hh>
#include <dune/common/exceptions.hh>
#include <dune/common/fvector.hh>
#include <dune/common/math.hh>
......@@ -40,13 +41,14 @@ namespace Dune
template<class K, int N> class FieldVector;
namespace {
template<class V>
struct VectorSize
struct DUNE_DEPRECATED_MSG("VectorSize is deprecated; please call the 'size()' method directly instead") VectorSize
{
static typename V::size_type size(const V & v) { return v.size(); }
};
DUNE_NO_DEPRECATED_BEGIN
template<class K, int N>
struct VectorSize< const FieldVector<K,N> >
struct DUNE_DEPRECATED_MSG("VectorSize is deprecated; please call the 'size()' method directly instead") VectorSize< const FieldVector<K,N> >
{
typedef FieldVector<K,N> V;
static typename V::size_type size(const V & v)
......@@ -55,6 +57,7 @@ namespace Dune
return N;
}
};
DUNE_NO_DEPRECATED_END
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment