Skip to content
Snippets Groups Projects
Commit 407ab86d authored by Max Kahnt's avatar Max Kahnt
Browse files

Add concepts.

parent 4e05f9af
Branches
No related tags found
No related merge requests found
#ifndef DUNE_MATRIX_VECTOR_CONCEPTS_HH
#define DUNE_MATRIX_VECTOR_CONCEPTS_HH
// though not needed for this file, checking
// for a concept requires this include anyway
#include <dune/common/concept.hh>
namespace Dune {
namespace MatrixVector {
namespace Concept {
struct HasBegin {
template <class C>
auto require(C&& c) -> decltype(c.begin());
};
struct HasN {
template <class C>
auto require(C&& c) -> decltype(c.N());
};
struct HasResize {
template <class C>
auto require(C&& c) -> decltype(c.resize(0));
};
struct HasSize {
template <class C>
auto require(C&& c) -> decltype(c.size());
};
} // end namespace Concept
} // end namespace MatrixVector
} // end namespace Dune
#endif // DUNE_MATRIX_VECTOR_CONCEPTS_HH
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment